This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Repository navigation
96 lines (79 loc) · 2.18 KB
/
Copy pathcmake-ci.yml
File metadata and controls
96 lines (79 loc) · 2.18 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
name: CI/CD Test Pipeline
on:
workflow_dispatch:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: gcc
- os: windows-latest
toolchain: mingw
- os: windows-2022
toolchain: visual-studio
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Show environment
shell: bash
run: |
echo "OS: $RUNNER_OS"
echo "Architecture: $RUNNER_ARCH"
echo "Toolchain: ${{ matrix.toolchain }}"
echo "CMake:"
cmake --version
echo "Python:"
python --version
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build
- name: Set up MSYS2
if: matrix.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Add MinGW to PATH
if: matrix.toolchain == 'mingw'
shell: pwsh
run: |
echo "C:\msys64\mingw64\bin" >> $env:GITHUB_PATH
- name: Set up MSVC
if: matrix.toolchain == 'visual-studio'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Verify GCC
if: matrix.toolchain == 'gcc' || matrix.toolchain == 'mingw'
shell: bash
run: |
gcc --version
g++ --version
- name: Verify MSVC
if: matrix.toolchain == 'visual-studio'
shell: cmd
run: |
cl
- name: Configure
run: |
python make.py --toolchain ${{ matrix.toolchain }} setup
- name: Build
run: |
python make.py --toolchain ${{ matrix.toolchain }} build
- name: Test
run: |
python make.py --toolchain ${{ matrix.toolchain }} test