-
Notifications
You must be signed in to change notification settings - Fork 18
98 lines (97 loc) · 2.92 KB
/
linux-ninja-gcc.yml
File metadata and controls
98 lines (97 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: linux-ninja-gcc
on:
pull_request:
paths:
- '.github/**'
- 'cmake/**'
- 'cml/**'
- 'tests/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'CML.cmake'
- 'vcpkg.json'
jobs:
build-and-test:
permissions:
checks: write
strategy:
fail-fast: false
matrix:
include:
- ver: "13"
- ver: "14"
env:
ENV_COMPILER_VERSION: "-${{ matrix.ver }}"
name: "(linux-ninja-gcc-s-vcpkg-${{ matrix.ver }})"
runs-on: ubuntu-latest
steps:
# Set the number of CMake build and test jobs
- name: Set CMake and CTest concurrency
shell: bash
run: |
ncore=`nproc`
echo "CMAKE_BUILD_PARALLEL_LEVEL=$ncore" >> $GITHUB_ENV
echo "CTEST_PARALLEL_LEVEL=$ncore" >> $GITHUB_ENV
- name: Install prerequisites
shell: bash
run: |
if [ ! -x "$(command -v sudo)" ]; then
apt-get update -qqy
apt-get install -qqy sudo
else
sudo apt-get -qq update
fi
sudo apt-get install -qqy ca-certificates sudo gpg wget nodejs
- name: Install vcpkg prerequisites
shell: bash
run: |
sudo apt-get install -qqy --no-install-recommends curl zip unzip tar pkg-config git
- name: Install g++-${{ matrix.ver }}
shell: bash
run: |
if [ ! -x "$(command -v g++-${{ matrix.ver }})" ]; then
sudo apt-get install -qqy --no-install-recommends g++-${{ matrix.ver }}
fi
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.31.0"
- uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'
- name: Build and test
shell: bash
run: |
preset="linux-ninja-gcc-s-vcpkg"
echo "Executing workflow $preset for gcc-${{ matrix.ver }} with VCPKG_ROOT @ $VCPKG_ROOT"
cmake --workflow --preset=$preset
- name: Generate JUnit test results
uses: ctrf-io/github-test-reporter@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
report-path: "ctest.xml"
status-check-name: "linux-ninja-gcc-s-vcpkg-${{ matrix.ver }} CTest Report"
status-check: true
annotate: true
summary: true
use-suite-name: true
file-report: true
failed-report: true
upload-artifact: false
integrations-config: |
{
"junit-to-ctrf": {
"enabled": true,
"action": "convert",
"options": {
"output": "ctrf.json",
"toolname": "junit-to-ctrf",
"useSuiteName": false,
"env": {
"appName": "cml"
}
}
}
}
if: ${{ always() }}