Skip to content

Commit

Permalink
Remove explicit Docker calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed Apr 14, 2024
1 parent 4a64df2 commit f10b3c9
Showing 1 changed file with 16 additions and 32 deletions.
48 changes: 16 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,41 @@ on: push
jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
container: ${{ matrix.container }}
name: ${{ matrix.container || matrix.os }}/${{ matrix.packaging }}
strategy:
fail-fast: false
matrix:
include:
- name: "Debian 11 (Bullseye)"
os: ubuntu-latest
- os: ubuntu-latest
container: debian:bullseye
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
- os: ubuntu-latest
container: debian:bookworm
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
- os: ubuntu-latest
container: ubuntu:focal
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
- os: ubuntu-latest
container: ubuntu:jammy
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: ""
env:
WORKSPACE: "${{ github.workspace }}"
CMAKE_OPTIONS: "${{ matrix.cmake_options }}"
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
run: ./.ci/${{ matrix.ci_type}}/install
- name: Build
run: ${{ matrix.worker }} ./.ci/${{ matrix.ci_type}}/build
run: ./.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 }}
run: ./.ci/${{ matrix.ci_type}}/post_build

0 comments on commit f10b3c9

Please sign in to comment.