summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2023-01-05 10:35:10 -0600
committerChad Elliott <elliottc@objectcomputing.com>2023-01-05 10:35:10 -0600
commit8b743a12847d28c8e01a644e5f06d34e390c9bbc (patch)
treef04d41533d82d8c268143432d12b74e7fb4f6f83 /.github/workflows
parent36c558c30b842c6b6f70b62a8736c35077b2f093 (diff)
downloadATCD-8b743a12847d28c8e01a644e5f06d34e390c9bbc.tar.gz
Added a GitHub Action for building with CMake.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cmake.yml74
1 files changed, 74 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 00000000000..4abf2226588
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,74 @@
+name: cmake
+
+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
+ matrix:
+ include:
+ - CC: gcc-12
+ CXX: g++-12
+ PackageDeps: g++-12
+ os: ubuntu-22.04
+ runs-on: ${{ matrix.os }}
+ name: ${{ matrix.os }} ${{ matrix.CXX }}
+ env:
+ ACE_ROOT: ${{ github.workspace }}/ACE
+ MPC_ROOT: ${{ github.workspace }}/MPC
+ CC: ${{ matrix.CC }}
+ CXX: ${{ matrix.CXX }}
+ steps:
+ - name: checkout ACE/TAO
+ uses: actions/checkout@v3
+ - name: checkout MPC
+ uses: actions/checkout@v3
+ with:
+ repository: DOCGroup/MPC
+ path: ${{ env.MPC_ROOT }}
+ - name: Add Repo
+ run: |
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
+ sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ ${{ matrix.Repo }} main"
+ if: matrix.Repo != ''
+ - name: Add packages
+ run: |
+ sudo apt-get --yes update
+ sudo apt-get --yes install ${{ matrix.PackageDeps }}
+ - name: create $ACE_ROOT/ace/config.h
+ run: |
+ '#include "ace/config-linux.h"' > ${env:ACE_ROOT}/ace/config.h
+ shell: pwsh
+ - name: Run mwc.pl on $(ACE_ROOT)/ace/ace.mwc
+ run: |
+ perl ${env:ACE_ROOT}/bin/mwc.pl -type cmake ${env:ACE_ROOT}/ace/ace.mwc -workers 6
+ shell: pwsh
+ - name: Run mwc.pl on $(ACE_ROOT)/apps/gperf/src
+ run: |
+ perl ${env:ACE_ROOT}/bin/mwc.pl -type cmake ${env:ACE_ROOT}/apps/gperf/src
+ shell: pwsh
+ - name: Build ace project
+ run: |
+ cd ${env:ACE_ROOT}/ace
+ cmake -S . -B build
+ cmake --build build -j6
+ shell: pwsh
+ - name: Build ACE/apps/gperf/src project
+ run: |
+ cd ${env:ACE_ROOT}/apps/gperf/src
+ cmake -S . -B build
+ cmake --build build -j6
+ shell: pwsh