[build] cleanup #850
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
- push | |
- pull_request_target | |
jobs: | |
build-internal-apt: | |
timeout-minutes: 5 | |
name: Build in ${{ matrix.compiler }}-${{ matrix.version }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
compiler: [ "gcc", "clang" ] | |
include: | |
- os: "ubuntu-24.04" | |
- compiler: clang | |
version: 16 | |
- compiler: clang | |
version: 17 | |
- compiler: clang | |
version: 18 | |
- compiler: gcc | |
version: 12 | |
- compiler: gcc | |
version: 13 | |
- compiler: gcc | |
version: 14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Compiler | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y man | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
sudo apt-get install -y g++-${{ matrix.version }} | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
sudo apt-get install -y clang-${{ matrix.version }} | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
fi | |
- name: Install and Test | |
run: (./install.sh && make tests test-installation) | |
build-external-pacman: | |
timeout-minutes: 5 | |
name: Build in ${{ matrix.compiler }}-default (${{ matrix.container }}) | |
runs-on: ubuntu-20.04 | |
container: | |
image: ${{ matrix.container }} | |
options: --user root | |
strategy: | |
matrix: | |
container: [ "archlinux:base" ] # https://hub.docker.com/_/archlinux/ | |
compiler: [ "gcc", "clang" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Compiler | |
run: | | |
pacman -Syu --noconfirm | |
pacman -Sy --noconfirm man-db wget curl ${{ matrix.compiler }} | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
echo "CC=gcc" >> $GITHUB_ENV | |
echo "CXX=g++" >> $GITHUB_ENV | |
else | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
fi | |
- name: Install and Test | |
run: (./install.sh && make tests test-installation) | |
build-external-apt-gcc: | |
timeout-minutes: 5 | |
name: Build in 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 in 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 in gcc-default | |
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 in clang-default | |
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 in (${{ 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 |