Skip to content

Commit

Permalink
Build in a container in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mitza-oci committed Aug 9, 2024
1 parent 1eee82d commit 8024c06
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/linux-container.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8024c06

Please sign in to comment.