Skip to content

Commit

Permalink
added macos and only upload gcc build as an artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmanDris committed May 24, 2024
1 parent 29a1e87 commit 12dfa4f
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
Expand All @@ -41,6 +41,8 @@ jobs:
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: cl

steps:
- uses: actions/checkout@v4
Expand All @@ -55,6 +57,7 @@ jobs:
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand All @@ -75,8 +78,23 @@ jobs:
# 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).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Upload Build Artifacts
- name: Upload Build Artifacts (Linux GCC)
if: matrix.os == 'ubuntu-latest' && matrix.c_compiler == 'gcc'
uses: actions/upload-artifact@v3
with:
name: chessengine-binaries-linux-${{ matrix.build_type }}
path: ${{ steps.strings.outputs.build-output-dir }}/

- name: Upload Build Artifacts (macOS)
if: matrix.os == 'macos-latest' && matrix.c_compiler == 'gcc'
uses: actions/upload-artifact@v3
with:
name: chessengine-binaries-macos-${{ matrix.build_type }}
path: ${{ steps.strings.outputs.build-output-dir }}/

- name: Upload Build Artifacts (Windows)
if: matrix.os == 'windows-latest' && matrix.c_compiler == 'cl'
uses: actions/upload-artifact@v3
with:
name: chessengine-binaries-${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}
name: chessengine-binaries-windows-${{ matrix.build_type }}
path: ${{ steps.strings.outputs.build-output-dir }}/

0 comments on commit 12dfa4f

Please sign in to comment.