Add readthedocs configuration #96
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 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "Debian 11 (Bullseye)" | |
os: ubuntu-latest | |
ci_type: deb | |
start_worker: "docker run -di -v ${WORKSPACE}:${WORKSPACE} --name worker --rm debian:bullseye" | |
worker: "docker exec -w ${WORKSPACE} -e WORKSPACE -e CMAKE_OPTIONS -e DEBIAN_FRONTEND=noninteractive worker" | |
stop_worker: "docker kill worker" | |
- name: "Debian 12 (Bookworm)" | |
os: ubuntu-latest | |
ci_type: deb | |
start_worker: "docker run -di -v ${WORKSPACE}:${WORKSPACE} --name worker --rm debian:bookworm" | |
worker: "docker exec -w ${WORKSPACE} -e WORKSPACE -e CMAKE_OPTIONS -e DEBIAN_FRONTEND=noninteractive worker" | |
stop_worker: "docker kill worker" | |
cmake_options: "-DCMAKE_CXX_STANDARD=17" | |
- name: "Ubuntu 20.04 (Focal)" | |
os: ubuntu-latest | |
ci_type: deb | |
start_worker: "docker run -di -v ${WORKSPACE}:${WORKSPACE} --name worker --rm ubuntu:focal" | |
worker: "docker exec -w ${WORKSPACE} -e WORKSPACE -e CMAKE_OPTIONS -e DEBIAN_FRONTEND=noninteractive worker" | |
stop_worker: "docker kill worker" | |
- name: "Ubuntu 22.04 (Jammy)" | |
os: ubuntu-latest | |
ci_type: deb | |
start_worker: "docker run -di -v ${WORKSPACE}:${WORKSPACE} --name worker --rm ubuntu:jammy" | |
worker: "docker exec -w ${WORKSPACE} -e WORKSPACE -e CMAKE_OPTIONS -e DEBIAN_FRONTEND=noninteractive worker" | |
stop_worker: "docker kill worker" | |
cmake_options: "-DCMAKE_CXX_STANDARD=17" | |
# - name: "macOS 11 (Big Sur) + Homebrew" | |
# os: macos-11 | |
# ci_type: brew | |
# start_worker: "" | |
# worker: "" | |
# stop_worker: "" | |
steps: | |
- name: Configure environment | |
run: | | |
echo "WORKSPACE=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | |
echo "CMAKE_OPTIONS=${{ matrix.cmake_options }}" >> $GITHUB_ENV | |
- name: Checkout latest revision | |
uses: actions/checkout@v4 | |
- name: Start the worker | |
run: ${{ matrix.start_worker }} | |
- name: Configure the build | |
run: ${{ matrix.worker }} ./.ci/${{ matrix.ci_type}}/install | |
- name: Build | |
run: ${{ matrix.worker }} ./.ci/${{ matrix.ci_type}}/build | |
- name: Run tests | |
run: ${{ matrix.worker }} ./.ci/${{ matrix.ci_type}}/post_build | |
- name: Stop the worker | |
run: ${{ matrix.stop_worker }} |