Skip to content

Commit

Permalink
Combined cicd for darwin and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenewald committed Apr 14, 2024
1 parent 1f89937 commit 7a6e3c6
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 410 deletions.
218 changes: 0 additions & 218 deletions .github/workflows/exchange-ci-darwin.yml

This file was deleted.

74 changes: 72 additions & 2 deletions .github/workflows/exchange-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,77 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1
run: ctest --output-on-failure --no-tests=error -j 2 -R "Unit*"

unit-test:
unit-test-darwin:
needs: [lint]

strategy:
matrix:
os: [macos-14]

runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: exchange


env:
CC: /opt/homebrew/opt/llvm/bin/clang
CXX: /opt/homebrew/opt/llvm/bin/clang++
CLANG_DIR: '/opt/homebrew/opt/llvm/bin/clang'
LLVM_DIR: '/opt/homebrew/opt/llvm'

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install LLVM 17
run: |
brew install llvm@17
brew install clang-format
- name: Install static analyzers
if: matrix.os == 'macos-14'
run: >-
brew install cppcheck
- name: Install Python
uses: actions/setup-python@v4
with: { python-version: "3.12" }

- name: Install Python
uses: actions/setup-python@v4
with: { python-version: "3.12-dev" }

- name: Install dependencies
shell: bash
run: |
pip3 install conan
conan profile detect
python3 ../.github/scripts/write_config.py
conan install . -s build_type=Release -b missing
- name: Setup MultiToolTask
if: matrix.os == 'windows-2022'
run: |
Add-Content "$env:GITHUB_ENV" 'UseMultiToolTask=true'
Add-Content "$env:GITHUB_ENV" 'EnforceProcessCountAcrossBuilds=true'
- name: Configure
shell: pwsh
run: cmake "--preset=ci-$("${{ matrix.os }}".split("-")[0])"

- name: Build
run: cmake --build build --config Release -j

- name: Install
run: cmake --install build --config Release --prefix prefix

- name: Test
working-directory: exchange/build
run: ctest --output-on-failure --no-tests=error -C Release -j 2 -R "Unit*"

unit-test-linux:
needs: [lint]

strategy:
Expand Down Expand Up @@ -325,7 +395,7 @@ jobs:

docs:
# Deploy docs only when builds succeed
needs: [sanitize, unit-test, integration-test]
needs: [sanitize, unit-test-darwin, unit-test-linux, integration-test]

runs-on: ubuntu-22.04
defaults:
Expand Down
Loading

0 comments on commit 7a6e3c6

Please sign in to comment.