-
Notifications
You must be signed in to change notification settings - Fork 41
213 lines (203 loc) · 7.36 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: Build
on:
- push
- pull_request_target
jobs:
build-internal-apt:
timeout-minutes: 5
name: Build with ${{ matrix.compiler.type }}-${{ matrix.compiler.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
compiler:
- {type: gcc, version: 12, package: g++, cc: gcc, cxx: g++}
- {type: gcc, version: 13, package: g++, cc: gcc, cxx: g++}
- {type: gcc, version: 14, package: g++, cc: gcc, cxx: g++}
- {type: clang, version: 16, package: clang, cc: clang, cxx: clang++}
- {type: clang, version: 17, package: clang, cc: clang, cxx: clang++}
- {type: clang, version: 18, package: clang, cc: clang, cxx: clang++}
include:
- os: "ubuntu-24.04"
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
sudo apt-get update
sudo apt-get install -y man ${{ matrix.compiler.package }}-${{ matrix.compiler.version }}
- name: Install and Test
env:
CC: ${{ matrix.compiler.cc }}-${{ matrix.compiler.version }}
CXX: ${{ matrix.compiler.cxx }}-${{ matrix.compiler.version }}
run: (./install.sh && make tests test-installation)
build-external-pacman:
timeout-minutes: 5
name: Build with ${{ matrix.compiler.type }} on ${{ matrix.container }}
runs-on: ubuntu-24.04
strategy:
matrix:
container: [ "archlinux:base" ] # https://hub.docker.com/_/archlinux/
compiler:
- {type: gcc, package: gcc, cc: gcc, cxx: g++}
- {type: clang, package: clang, cc: clang, cxx: clang++}
container:
image: ${{ matrix.container }}
options: --user root
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
pacman -Syu --noconfirm
pacman -Sy --noconfirm man-db wget curl ${{ matrix.compiler.package }}
- name: Install and Test
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: (./install.sh && make tests test-installation)
build-external-apt-gcc:
timeout-minutes: 5
name: Build with gcc-${{ matrix.version }} (${{ matrix.container }})
runs-on: ubuntu-20.04
container:
image: ${{ matrix.container }}
options: --user root
strategy:
matrix:
container: [ "debian:11.1" ]
version: [ "9", "10" ] # gcc 11 doesn't exist in debian apt
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
apt-get update
apt-get install -y man g++-${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-external-apt-clang:
timeout-minutes: 5
name: Build with clang-${{ matrix.version }} (${{ matrix.container }})
runs-on: ubuntu-20.04
container:
image: ${{ matrix.container }}
options: --user root
strategy:
matrix:
container: [ "debian:11.1" ]
version: [ "9", "11" ] # clang 10 doesn't exist in debian apt
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
apt-get update
apt-get install -y man clang-${{ matrix.version }}
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-external-yum-gcc:
timeout-minutes: 10
name: Build with gcc
runs-on: ubuntu-20.04
container:
image: ${{ matrix.container }}
options: --user root
strategy:
matrix:
container: [ "fedora:34", "fedora:35" ] # "amazonlinux:2023" is broken because of missing pandoc
steps:
- name: Install AmazonLinux deps needed specifically for GitHub action
if: startsWith(matrix.container, 'amazonlinux')
run: yum -y install tar xz gzip
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
yum -y install man gcc-c++
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-external-yum-clang:
timeout-minutes: 10
name: Build with clang
runs-on: ubuntu-20.04
container:
image: ${{ matrix.container }}
options: --user root
strategy:
matrix:
container: [ "fedora:34", "fedora:35" ] # "amazonlinux:2023" is broken because of missing pandoc
steps:
- name: Install AmazonLinux deps needed specifically for GitHub action
if: startsWith(matrix.container, 'amazonlinux')
run: yum -y install tar xz gzip
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
yum -y install man clang
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-mac-gcc:
timeout-minutes: 10
name: Build with gcc-${{ matrix.version }} (${{ matrix.container }})
runs-on: ${{ matrix.container }}
strategy:
matrix:
container: [ "macOS-12" ]
version: [ "10", "11" ] # On 2023-02-11, version 9 was already broken: "g++-9: warning: '12.6' is not valid for 'mmacosx-version-min'"
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
brew install cmake ninja
brew install gcc@${{ matrix.version }}
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-mac-xcode:
timeout-minutes: 15
name: Build with default Xcode (${{ matrix.container }})
runs-on: ${{ matrix.container }}
strategy:
matrix:
container: [ "macOS-12" ]
steps:
- uses: actions/checkout@v4
- name: Setup Compiler
run: |
brew install cmake ninja
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Install and Test
run: (./install.sh && make tests test-installation)
build-other-arch-gcc:
timeout-minutes: 15
name: Build on ${{ matrix.container }} ${{ matrix.arch }}
runs-on: ubuntu-20.04
strategy:
matrix:
container: [ "bookworm" ] # Has GCC 12
arch: [ "aarch64", "s390x", "ppc64le" ] # , "armv6", "armv7" -- 32 bits archs, currently not supported by ngs
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2.7.2
name: Run commands
id: runcmd
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.container }}
# Not required, but speeds up builds by storing container images in GitHub package registry.
githubToken: ${{ github.token }}
# Mount the local folder as /ngs in the container
dockerRunArgs: |
--volume "${PWD}:/ngs"
install: |
apt-get update
apt-get install -y man sudo
# Set an output parameter `uname` for use in subsequent steps
run: |
cd /ngs && ./install.sh && make tests test-installation
uname -a