-
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (92 loc) · 2.72 KB
/
cc.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
---
name: Build
on: push
jobs:
build-windows:
name: Build & test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
cc: clang
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
echo "/c/msys64/mingw64/bin" >> $GITHUB_PATH
- uses: finwo/stddoc.c@edge
name: Install stddoc
- uses: finwo/dep@main
name: Install dep
- name: Install dependencies
run: dep install
shell: bash
- name: Build & check
shell: bash
run: |
make CC=${{ matrix.cc }}
./test
build-linux:
name: Build & test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- distro: ubuntu_latest
arch: aarch64
cc: gcc
- distro: ubuntu_latest
arch: riscv64
cc: gcc
- distro: ubuntu_latest
arch: none
cc: gcc
steps:
- uses: actions/checkout@v4
- uses: finwo/dep@main
name: Install dep
- if: ${{ matrix.arch == 'none' }}
uses: finwo/stddoc.c@edge
name: Install stddoc
- name: Install dependencies
run: dep install
shell: bash
- if: ${{ matrix.arch != 'none' }}
uses: uraimo/run-on-arch-action@v2
name: Build & check (${{ matrix.arch }})
id: runcmd
continue-on-error: true
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
install: |
apt-get update -yq
apt-get install -yq build-essential wget
wget https://github.com/finwo/stddoc.c/releases/download/edge/stddoc-lin-${{ matrix.arch }} -o /usr/local/bin/stddoc
chmod +x /usr/local/bin/stddoc
run: |
make CC=${{ matrix.cc }}
./test
- if: ${{ matrix.arch != 'none' && steps.runcmd.outcome == 'failure' }}
uses: uraimo/run-on-arch-action@v2
name: Build & check (${{ matrix.arch }}, retry)
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
install: |
apt-get update -yq
apt-get install -yq build-essential wget
wget https://github.com/finwo/stddoc.c/releases/download/edge/stddoc-lin-${{ matrix.arch }} -o /usr/local/bin/stddoc
chmod +x /usr/local/bin/stddoc
run: |
make CC=${{ matrix.cc }}
./test
- if: ${{ matrix.arch == 'none' }}
name: Build & check (native)
shell: bash
run: |
make CC=${{ matrix.cc }}
./test