From 8024c06c59fd8f5a1f6692710dd926c5a41c81db Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Thu, 8 Aug 2024 16:55:50 -0500 Subject: [PATCH] Build in a container in GitHub Actions --- .github/workflows/linux-container.yml | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/linux-container.yml diff --git a/.github/workflows/linux-container.yml b/.github/workflows/linux-container.yml new file mode 100644 index 0000000000000..3ecaa70dcf155 --- /dev/null +++ b/.github/workflows/linux-container.yml @@ -0,0 +1,66 @@ +name: linux + +on: + push: + pull_request: + schedule: + - cron: '0 1 * * SUN' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build: + strategy: + fail-fast: false + runs-on: ubuntu-22.04 + name: alpine-3.18 + env: + ACE_ROOT: ${{ github.workspace }}/ACE + TAO_ROOT: ${{ github.workspace }}/TAO + MPC_ROOT: ${{ github.workspace }}/MPC + steps: + - name: Checkout ACE_TAO + uses: actions/checkout@v4 + - name: Checkout MPC + uses: actions/checkout@v4 + with: + repository: DOCGroup/MPC + path: ${{ env.MPC_ROOT }} + - name: Create $ACE_ROOT/ace/config.h + run: | + echo '#include "ace/config-linux.h"' > ${{ env.ACE_ROOT }}/ace/config.h + - name: Create $ACE_ROOT/include/makeinclude/platform_macros.GNU + run: | + echo 'include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU' > ${{ env.ACE_ROOT }}/include/makeinclude/platform_macros.GNU + - name: Add system packages + uses: addnab/docker-run-action@v3 + with: + image: alpine:3.18 + options: -v ${{ github.workspace }}:${{ github.workspace }} + run: apk add --no-cache git bash make g++ perl linux-headers + - name: Generate makefiles + uses: addnab/docker-run-action@v3 + with: + image: alpine:3.18 + options: -v ${{ github.workspace }}:${{ github.workspace }} + run: | + perl ${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace ${{ env.TAO_ROOT }}/TAO_ACE.mwc -workers 4 + perl ${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace ${{ env.ACE_ROOT }}/tests/tests.mwc -workers 4 + perl ${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace ${{ env.TAO_ROOT }}/tests/IDL_Test -workers 4 + perl ${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace ${{ env.TAO_ROOT }}/tests/IDLv4 -workers 4 + - name: Build + uses: addnab/docker-run-action@v3 + with: + image: alpine:3.18 + options: -v ${{ github.workspace }}:${{ github.workspace }} + run: | + make -j 6 -C ${{ env.TAO_ROOT }} + make -j 6 -C ${{ env.ACE_ROOT }}/tests + make -j 6 -C ${{ env.TAO_ROOT }}/tests/IDL_Test + make -j 6 -C ${{ env.TAO_ROOT }}/tests/IDLv4