Skip to content

Commit

Permalink
GitActions / CI improvements with macos (#123)
Browse files Browse the repository at this point in the history
* Update and rename cmake_build_run_ctest.yml to buildAndRunTests.yml
* Added macOS for concurrent runs with ubuntu
* Added macOS bootstrap with code, thanks to: https://github.com/marketplace/actions/setup-xcode-version
  • Loading branch information
Kjell Hedström. We are hiring @ Ganaz authored Mar 9, 2022
1 parent 98792af commit aebf9c1
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 31 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/buildAndRunTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: ci/action verbose ctest script
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
# if you have to do a quick fix and the CI is already running your new commit will kill already
# going processes before starting new ones
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Run Mac Build
if: matrix.os == 'macos-latest'
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest


- name: macos Bootstrap
if: matrix.os == 'macos-latest'
run: |
echo "MacOS Latest"
brew update --preinstall
brew install boost
- name: Linux Bootstrap
if: matrix.os == 'ubuntu-latest'
run: |
echo "Ubuntu Latest"
gcc --version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ninja-build cmake gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo apt-get install -y unzip zlib1g-dev libboost-all-dev libc6-dev
echo gcc version after
gcc --version
cmake --version
- name: build, and run ctest
shell: bash
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
./scripts/buildAndRunTests.sh
31 changes: 0 additions & 31 deletions .github/workflows/cmake_build_run_ctest.yml

This file was deleted.

0 comments on commit aebf9c1

Please sign in to comment.