From 12dfa4fe57b3c21f89bbc15b93a404fd763efe88 Mon Sep 17 00:00:00 2001 From: armandrismir Date: Fri, 24 May 2024 16:45:39 -0700 Subject: [PATCH] added macos and only upload gcc build as an artifact --- .github/workflows/cmake-multi-platform.yml | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index f5b1047..1da92f4 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -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: @@ -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 @@ -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 @@ -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 }}/