[build] Make building documentation configurable #895
Workflow file for this run
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 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 |