Skip to content

Commit 88be187

Browse files
authored
Merge pull request #40 from csboo/ci
artifact uploading
2 parents 9f40a93 + df89887 commit 88be187

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,40 @@ jobs:
2323
#
2424
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
2525
matrix:
26-
os: [ubuntu-latest, windows-latest]
26+
os: [ubuntu-latest, macos-latest, windows-latest]
2727
build_type: [Release]
2828
c_compiler: [gcc, clang, cl]
2929
include:
30+
# windows
3031
- os: windows-latest
3132
c_compiler: cl
3233
cpp_compiler: cl
34+
# ubuntu
3335
- os: ubuntu-latest
3436
c_compiler: gcc
3537
cpp_compiler: g++
3638
- os: ubuntu-latest
3739
c_compiler: clang
3840
cpp_compiler: clang++
41+
# macos
42+
- os: macos-latest
43+
c_compiler: gcc
44+
cpp_compiler: g++
45+
- os: macos-latest
46+
c_compiler: clang
47+
cpp_compiler: clang++
3948
exclude:
49+
# windows
4050
- os: windows-latest
4151
c_compiler: gcc
4252
- os: windows-latest
4353
c_compiler: clang
54+
# ubuntu
4455
- os: ubuntu-latest
4556
c_compiler: cl
57+
# macos
58+
- os: macos-latest
59+
c_compiler: cl
4660

4761
steps:
4862
- uses: actions/checkout@v4
@@ -67,3 +81,21 @@ jobs:
6781
- name: Build
6882
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
6983
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
84+
85+
- name: Upload example executables
86+
if: ${{ runner.os == 'Windows' }}
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: examples_${{ matrix.os }}_${{ matrix.c_compiler }}
90+
path: ${{ steps.strings.outputs.build-output-dir }}/Release/*
91+
92+
- name: Upload example executables
93+
if: ${{ runner.os != 'Windows' }}
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: examples_${{ matrix.os }}_${{ matrix.c_compiler }}
97+
path: |
98+
${{ steps.strings.outputs.build-output-dir }}/*
99+
!${{ steps.strings.outputs.build-output-dir }}/*/*
100+
!${{ steps.strings.outputs.build-output-dir }}/*.*
101+
!${{ steps.strings.outputs.build-output-dir }}/*Makefile

0 commit comments

Comments
 (0)