From d99179a728b529b71b0ca00ec567d300fbdb65c3 Mon Sep 17 00:00:00 2001 From: Roy Lenferink Date: Sun, 7 Jan 2024 13:35:33 +0100 Subject: [PATCH] container: Add container build workflow --- .github/workflows/containers.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/containers.yml diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml new file mode 100644 index 000000000..95b92edae --- /dev/null +++ b/.github/workflows/containers.yml @@ -0,0 +1,38 @@ +name: Celix development containers + +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' # Weekly on Sunday at 00:00 UTC + +jobs: + container-build-ubuntu: + runs-on: ubuntu-22.04 + timeout-minutes: 120 + steps: + - name: Checkout source code + uses: actions/checkout@v3.3.0 + - name: Build container image + run: | + cd $GITHUB_WORKSPACE/container/ + ./build-ubuntu-container.sh + - name: Build Celix using container image + run: | + cd $GITHUB_WORKSPACE/container/ + ./run-ubuntu-container.sh "mkdir -p build && cd build && ../container/support-scripts/build-all.sh && make -j" + - name: Run Celix tests using container image + run: | + cd $GITHUB_WORKSPACE/container/ + ./run-ubuntu-container.sh "cd build && ctest --output-on-failure" + + container-build-gitpod: + runs-on: ubuntu-22.04 + timeout-minutes: 120 + steps: + - name: Checkout source code + uses: actions/checkout@v3.3.0 + - name: Build container image + run: | + cd $GITHUB_WORKSPACE/container/ + docker build -t apache/celix-dev:gitpod-latest -f Containerfile.gitpod .