Skip to content

Commit aebf9c1

Browse files
author
Kjell Hedström. We are hiring @ Ganaz
authored
GitActions / CI improvements with macos (#123)
* 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
1 parent 98792af commit aebf9c1

File tree

2 files changed

+59
-31
lines changed

2 files changed

+59
-31
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: ci/action verbose ctest script
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
8+
# 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
9+
# if you have to do a quick fix and the CI is already running your new commit will kill already
10+
# going processes before starting new ones
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
runs-on: ${{ matrix.os }}
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Run Mac Build
26+
if: matrix.os == 'macos-latest'
27+
uses: maxim-lobanov/setup-xcode@v1.4.1
28+
with:
29+
xcode-version: latest
30+
31+
32+
- name: macos Bootstrap
33+
if: matrix.os == 'macos-latest'
34+
run: |
35+
echo "MacOS Latest"
36+
brew update --preinstall
37+
brew install boost
38+
39+
40+
- name: Linux Bootstrap
41+
if: matrix.os == 'ubuntu-latest'
42+
run: |
43+
echo "Ubuntu Latest"
44+
gcc --version
45+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
46+
sudo apt-get update
47+
sudo apt-get install ninja-build cmake gcc-9 g++-9
48+
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
49+
sudo apt-get install -y unzip zlib1g-dev libboost-all-dev libc6-dev
50+
echo gcc version after
51+
gcc --version
52+
cmake --version
53+
54+
- name: build, and run ctest
55+
shell: bash
56+
run: |
57+
echo github.event.action: ${{ github.event.action }}
58+
echo github.event_name: ${{ github.event_name }}
59+
./scripts/buildAndRunTests.sh

.github/workflows/cmake_build_run_ctest.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)