From 99832511a9ac77afee06352084f845ec58a60959 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Apr 2024 13:43:38 +0200 Subject: [PATCH 1/7] Create cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/cmake-multi-platform.yml diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml new file mode 100644 index 0000000..5ceee28 --- /dev/null +++ b/.github/workflows/cmake-multi-platform.yml @@ -0,0 +1,69 @@ +# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml +name: CMake on multiple platforms + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. + fail-fast: false + + # Set up a matrix to run the following 3 configurations: + # 1. + # 2. + # 3. + # + # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. + matrix: + os: [ubuntu-latest, windows-latest] + build_type: [Release] + c_compiler: [gcc, clang, cl] + include: + - os: windows-latest + c_compiler: cl + cpp_compiler: cl + - os: ubuntu-latest + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-latest + c_compiler: clang + cpp_compiler: clang++ + exclude: + - os: windows-latest + c_compiler: gcc + - os: windows-latest + c_compiler: clang + - os: ubuntu-latest + c_compiler: cl + + steps: + - uses: actions/checkout@v3 + + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + 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 + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }} + + - name: Build + # 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 }} From 5c732adf8e7cad515c218d1adce388e136cfe5ea Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Apr 2024 13:46:14 +0200 Subject: [PATCH 2/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 5ceee28..9c2e4ce 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -47,6 +47,12 @@ jobs: steps: - uses: actions/checkout@v3 + - name: install_dependencies + run: | + sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" + sudo apt-get update -y -qq + sudo apt-get install libsdl2-dev libglm-dev + - name: Set reusable strings # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings From d836d530ed2e0d7e455aa0c9e5ad4cf8abc6caf6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Apr 2024 13:51:23 +0200 Subject: [PATCH 3/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 9c2e4ce..fa4da46 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -1,5 +1,3 @@ -# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml name: CMake on multiple platforms on: @@ -46,6 +44,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + submodules: "recurvice" - name: install_dependencies run: | From 936c09bc363a6acd622f66d19c3a2e1ddad4cd8b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Apr 2024 13:55:06 +0200 Subject: [PATCH 4/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index fa4da46..7f37790 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -43,7 +43,7 @@ jobs: c_compiler: cl steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: "recurvice" From ea78d58e4315c088b4ff04aac2b2f48e17a4f4f3 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 17 Apr 2024 14:04:53 +0200 Subject: [PATCH 5/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 7f37790..4d2d11f 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: "recurvice" + submodules: "recursive" - name: install_dependencies run: | From 207264bb44cd18c7ae016ab55a3641a5a06bbd9c Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 18 Apr 2024 11:55:28 +0200 Subject: [PATCH 6/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 4d2d11f..46631a8 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -25,9 +25,9 @@ jobs: build_type: [Release] c_compiler: [gcc, clang, cl] include: - - os: windows-latest - c_compiler: cl - cpp_compiler: cl + #- os: windows-latest + # c_compiler: cl + # cpp_compiler: cl - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ @@ -35,10 +35,10 @@ jobs: c_compiler: clang cpp_compiler: clang++ exclude: - - os: windows-latest - c_compiler: gcc - - os: windows-latest - c_compiler: clang + #- os: windows-latest + # c_compiler: gcc + #- os: windows-latest + # c_compiler: clang - os: ubuntu-latest c_compiler: cl From 377fb0cf03539d21545a6dbecae0be5aebe894d6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 18 Apr 2024 16:24:40 +0200 Subject: [PATCH 7/7] Update cmake-multi-platform.yml --- .github/workflows/cmake-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 46631a8..4ad8f82 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] build_type: [Release] c_compiler: [gcc, clang, cl] include: