-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (88 loc) · 2.67 KB
/
Copy pathci-cell.yml
File metadata and controls
97 lines (88 loc) · 2.67 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
name: CI cell
on:
workflow_call:
inputs:
cell-id:
required: true
type: string
os:
required: true
type: string
c-compiler:
required: true
type: string
cpp-compiler:
required: true
type: string
build-type:
required: false
type: string
default: Release
jobs:
cell:
name: ${{ inputs.cell-id }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2 MinGW
if: inputs.c-compiler == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
- name: Checkout STLSoft
shell: bash
run: |
set -euo pipefail
git clone --depth 1 https://github.com/synesissoftware/STLSoft "$RUNNER_TEMP/stlsoft"
- name: Configure
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake -B build -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DSTLSOFT="$RUNNER_TEMP/stlsoft" \
-DBUILD_TESTING=OFF
else
cmake -B build -S . \
-DSTLSOFT="$RUNNER_TEMP/stlsoft" \
-DBUILD_TESTING=OFF
fi
- name: Build
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake --build build --parallel 2
else
cmake --build build --config "${{ inputs.build-type }}" --parallel
fi
- name: Install and verify
shell: bash
run: |
set -euo pipefail
PREFIX="${RUNNER_TEMP}/install-prefix"
PROJECT="$(tr -d '[:space:]' < .sis/project_name.txt)"
if [ "${{ inputs.c-compiler }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake --install build --prefix "$PREFIX"
else
cmake --install build --config "${{ inputs.build-type }}" --prefix "$PREFIX"
fi
test -f "$PREFIX/bin/${PROJECT}.exe"
- name: Smoke run
shell: bash
run: |
set -euo pipefail
PREFIX="${RUNNER_TEMP}/install-prefix"
PROJECT="$(tr -d '[:space:]' < .sis/project_name.txt)"
"$PREFIX/bin/${PROJECT}.exe" --version