Skip to content

Commit efcb2f9

Browse files
Unify workflows across platforms
1 parent 713be2f commit efcb2f9

File tree

1 file changed

+10
-55
lines changed

1 file changed

+10
-55
lines changed

.github/workflows/cmake.yml

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ on:
77
branches: [ "master" ]
88

99
jobs:
10-
linux-build:
11-
runs-on: ubuntu-latest
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-latest, windows-latest ]
14+
# Disabled until <curses.h> can be safely included without conflict in terminal.h
15+
# os: [ ubuntu-latest, windows-latest, macos-latest ]
16+
runs-on: ${{matrix.os}}
1217

1318
env:
1419
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
@@ -26,60 +31,10 @@ jobs:
2631
- name: CMake version
2732
run: cmake --version
2833

29-
- name: CMake workflow
34+
- name: CMake Linux workflow
35+
if: ${{matrix.os == 'ubuntu-latest'}}
3036
run: cmake --workflow --preset ci-linux
3137

32-
# Disabled until <curses.h> can be safely included without conflict in terminal.h
33-
# macos-build:
34-
# runs-on: macos-latest
35-
36-
# env:
37-
# VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
38-
39-
# steps:
40-
# - uses: actions/[email protected]
41-
# with:
42-
# submodules: true
43-
# - uses: actions/github-script@v7
44-
# with:
45-
# script: |
46-
# core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
47-
# core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
48-
49-
# - name: CMake workflow
50-
# run: cmake --workflow --preset ci-linux
51-
52-
windows-build:
53-
runs-on: windows-latest
54-
55-
env:
56-
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
57-
58-
steps:
59-
- uses: actions/[email protected]
60-
with:
61-
submodules: true
62-
- uses: actions/github-script@v7
63-
with:
64-
script: |
65-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
66-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
67-
68-
- name: Download bison
69-
shell: powershell
70-
env:
71-
BISON_ZIP_URL: http://user.xmission.com/~legalize/trn/bison-2.4.1.zip
72-
BISON_ZIP_PATH: ${{github.workspace}}/../bison-2.4.1.zip
73-
BISON_PATH: ${{github.workspace}}/../bison
74-
run: |
75-
Invoke-WebRequest -Uri ${{env.BISON_ZIP_URL}} -OutFile "${{env.BISON_ZIP_PATH}}"
76-
mkdir ${{env.BISON_PATH}}
77-
cd ${{env.BISON_PATH}}
78-
7z x -y ${{env.BISON_ZIP_PATH}}
79-
Add-Content $env:GITHUB_PATH "${{env.BISON_PATH}}/bin"
80-
81-
- name: CMake version
82-
run: cmake --version
83-
8438
- name: CMake workflow
39+
if: ${{matrix.os != 'ubuntu-latest'}}
8540
run: cmake --workflow --preset default

0 commit comments

Comments
 (0)