-
Notifications
You must be signed in to change notification settings - Fork 190
129 lines (123 loc) · 3.2 KB
/
main.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
on:
push:
branches: main
pull_request:
merge_group:
name: CI
jobs:
test-software:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- 'pypy-3.8'
- 'pypy-3.9'
allow-failure:
- false
include:
- python-version: '3.12-dev'
allow-failure: true
continue-on-error: '${{ matrix.allow-failure }}'
name: 'test-software (${{ matrix.python-version }})'
steps:
- name: Preserve caches
uses: actions/cache@v3
with:
path: |
~/.cache/wasmtime
~/.cache/YoWASP
~/.cache/GlasgowEmbedded
key: ${{ runner.os }}
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: ./software
run: pdm install -G :all
- name: Run tests
working-directory: ./software
env:
YOSYS: yowasp-yosys
NEXTPNR_ICE40: yowasp-nextpnr-ice40
ICEPACK: yowasp-icepack
run: pdm run test
build-firmware:
runs-on: ubuntu-22.04
steps:
- name: Check out source code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install sdcc
- name: Build libfx2
working-directory: ./vendor/libfx2/firmware
run: make
- name: Build firmware
working-directory: ./firmware
run: make
build-manual:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: docs/manual
steps:
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
- name: Install dependencies
run: |
pdm install
- name: Build documentation
run: |
pdm run build
- name: Upload documentation archive
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/manual/out
required: # group all required workflows into one to avoid reconfiguring this in Actions settings
needs:
- test-software
- build-firmware
- build-manual
runs-on: ubuntu-latest
steps:
- run: |
true
publish-manual-dev:
needs: build-manual
if: github.repository != 'GlasgowEmbedded/glasgow'
runs-on: ubuntu-22.04
steps:
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download documentation archive
uses: actions/download-artifact@v3
with:
name: docs
path: pages/${{ github.ref_name }}/
- name: Disable Jekyll
run: |
touch pages/.nojekyll
- name: Publish documentation for a branch
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
folder: pages/
clean: false