This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (61 loc) · 1.84 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: build
on:
workflow_dispatch: {}
# push:
# branches:
# - main
jobs:
build:
# runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v11
with:
version: '3.1.18'
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn
- name: Install nextpnr dependencies
run: |
sudo apt update
sudo apt install -y build-essential clang cmake git libboost-all-dev libeigen3-dev libftdi-dev openocd python3
- name: Build
run: ./build.sh
- name: Publish
run: ./publish.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.YARN_TOKEN }}
- name: Commit and tag
uses: EndBug/add-and-commit@v7
with:
add: '.'
default_author: 'github_actions'
message: 'Release v${{ env.NEW_VERSION }}'
pull: 'NO-PULL'
push: true
tag: 'v${{ env.NEW_VERSION }}'
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: 'v${{ env.NEW_VERSION }}'
name: 'nextpnr.js v${{ env.NEW_VERSION }}'
body: 'WebAssembly version of nextpnr https://github.com/YosysHQ/nextpnr/commit/${{ env.UPSTREAM_COMMIT }}.'
- name: Reset Git repository
if: ${{ always() }}
run: |
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive