Skip to content

Commit 0931923

Browse files
committed
Don't compile examples in actions
1 parent ca6a63f commit 0931923

1 file changed

Lines changed: 43 additions & 42 deletions

File tree

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

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ 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]
27-
build_type: [Debug, Release]
28-
c_compiler: [gcc, clang, cl]
26+
os: [ ubuntu-latest, windows-latest ]
27+
build_type: [ Debug, Release ]
28+
c_compiler: [ gcc, clang, cl ]
2929
include:
3030
- os: windows-latest
3131
c_compiler: cl
@@ -45,50 +45,51 @@ jobs:
4545
c_compiler: cl
4646

4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v4
4949

50-
- name: Set reusable strings
51-
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
52-
id: strings
53-
shell: bash
54-
run: |
55-
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
50+
- name: Set reusable strings
51+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
52+
id: strings
53+
shell: bash
54+
run: |
55+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
5656
57-
- name: Install Dependencies For Linux
58-
if: ${{ matrix.os == 'ubuntu-latest' }}
59-
run: sudo apt-get update && sudo apt install libxcb1-dev libx11-dev libxrandr-dev libwayland-dev libdirectfb-dev
57+
- name: Install Dependencies For Linux
58+
if: ${{ matrix.os == 'ubuntu-latest' }}
59+
run: sudo apt-get update && sudo apt install libxcb1-dev libx11-dev libxrandr-dev libwayland-dev libdirectfb-dev
6060

61-
- name: Configure CMake
62-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
63-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
64-
run: >
65-
cmake -B ${{ steps.strings.outputs.build-output-dir }}
66-
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
67-
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
68-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
69-
-S ${{ github.workspace }}
61+
- name: Configure CMake
62+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
63+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
64+
run: >
65+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
66+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
67+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
68+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
69+
-DLUNA_EXAMPLES=OFF
70+
-S ${{ github.workspace }}
7071
71-
- name: Build
72-
# 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).
73-
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
74-
75-
- name: Upload Compiled Binary
76-
if: ${{ matrix.os == 'ubuntu-latest' }}
77-
uses: actions/upload-artifact@v4.6.2
78-
with:
79-
# Artifact name
80-
name: libLuna_${{ matrix.build_type }}_${{ matrix.c_compiler }}.a
81-
path: build/libLuna.a
82-
retention-days: 90
72+
- name: Build
73+
# 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).
74+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
8375

84-
- name: Upload Compiled Binary
85-
if: ${{ matrix.os == 'windows-latest' }}
86-
uses: actions/upload-artifact@v4.6.2
87-
with:
88-
# Artifact name
89-
name: Luna_${{ matrix.build_type }}.lib
90-
path: build/${{ matrix.build_type }}/Luna.lib
91-
retention-days: 90
76+
- name: Upload Compiled Binary
77+
if: ${{ matrix.os == 'ubuntu-latest' }}
78+
uses: actions/upload-artifact@v4.6.2
79+
with:
80+
# Artifact name
81+
name: libLuna_${{ matrix.build_type }}_${{ matrix.c_compiler }}.a
82+
path: build/libLuna.a
83+
retention-days: 90
84+
85+
- name: Upload Compiled Binary
86+
if: ${{ matrix.os == 'windows-latest' }}
87+
uses: actions/upload-artifact@v4.6.2
88+
with:
89+
# Artifact name
90+
name: Luna_${{ matrix.build_type }}.lib
91+
path: build/${{ matrix.build_type }}/Luna.lib
92+
retention-days: 90
9293

9394

9495
# - name: Test

0 commit comments

Comments
 (0)