Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
dsvensson committed Mar 22, 2024
1 parent 1201ebb commit 9b506f1
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 9 deletions.
55 changes: 52 additions & 3 deletions .github/workflows/build-targets.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: build targets
on: [push, pull_request, workflow_dispatch]
jobs:
windows-build:
cmake-windows-build:
runs-on: windows-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
compression-level: 9
if: ${{ matrix.should_upload }}

macos-build:
cmake-macos-build:
runs-on: macos-13
strategy:
matrix:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
path: ezQuake.zip
compression-level: 9

macos-universal:
cmake-macos-universal:
needs: macos-build
runs-on: macos-13
steps:
Expand Down Expand Up @@ -119,6 +119,55 @@ jobs:
path: ezQuake.zip
compression-level: 9

cmake-linux-build:
runs-on: ubuntu-latest
strategy:
matrix:
configurePreset: [ninja-mingw64-i686-cross, ninja-mingw64-x64-cross]
include:
- configurePreset: ninja-mingw64-i686-cross
buildPreset: ninja-mingw64-i686-cross
packages: "wine gcc-mingw-w64-i686"
should_upload: true
- configurePreset: ninja-mingw64-x64-cross
buildPreset: ninja-mingw64-x64-cross-release
packages: "wine g++-mingw-w64-x86-64"
should_upload: false

steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true

- name: Install build dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq ${{ matrix.packages }}
- uses: lukka/get-cmake@latest

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11

- name: Run CMake
uses: lukka/run-cmake@v10
with:
configurePreset: ${{ matrix.configurePreset }}
buildPreset: ${{ matrix.buildPreset }}

- name: Prepare upload
run: zip -r ../../../ezQuake.zip ezQuake.app
working-directory: cmake-build-presets/${{ matrix.buildPreset }}/Release/ezquake.exe

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildPreset }}
path: ezQuake.zip
compression-level: 9

linux-build:
runs-on: ubuntu-latest
strategy:
Expand Down
13 changes: 7 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
"name": "ninja-mingw64-i686-cross",
"inherits": ["ninja-mingw64-i686-shared", "template-gcc-mingw-cross"],
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"CMAKE_SYSTEM_PROCESSOR": "i686"
},
"environment": {
Expand Down Expand Up @@ -182,17 +183,17 @@
"displayName": "XCode (arm64)",
"inherits": "xcode",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "arm64-osx",
"CMAKE_OSX_ARCHITECTURES": "arm64",
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0",
"VCPKG_C_FLAGS": "-mmacosx-version-min=14.0",
"VCPKG_CXX_FLAGS": "-mmacosx-version-min=14.0"
"CMAKE_OSX_DEPLOYMENT_TARGET": "14.0"
}
},
{
"name": "xcode-arm64-release-ci",
"inherits": "xcode-arm64",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "arm64-osx-release"
}
},
Expand All @@ -201,17 +202,17 @@
"displayName": "XCode (x64)",
"inherits": "xcode",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "x64-osx",
"CMAKE_OSX_ARCHITECTURES": "x86_64",
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.7",
"VCPKG_C_FLAGS": "-mmacosx-version-min=12.7",
"VCPKG_CXX_FLAGS": "-mmacosx-version-min=12.7"
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.7"
}
},
{
"name": "xcode-x64-release-ci",
"inherits": "xcode-x64",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/triplets",
"VCPKG_TARGET_TRIPLET": "x64-osx-release"
}
}
Expand Down
11 changes: 11 additions & 0 deletions cmake/triplets/arm64-osx-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS "-mmacosx-version-min=14.0 ")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=14.0 ")
9 changes: 9 additions & 0 deletions cmake/triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_C_FLAGS "-mmacosx-version-min=14.0 ")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=14.0 ")
10 changes: 10 additions & 0 deletions cmake/triplets/x64-osx-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_C_FLAGS "-mmacosx-version-min=12.7 ")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=12.7 ")
9 changes: 9 additions & 0 deletions cmake/triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

set(VCPKG_C_FLAGS "-mmacosx-version-min=12.7 ")
set(VCPKG_CXX_FLAGS "-mmacosx-version-min=12.7 ")
9 changes: 9 additions & 0 deletions cmake/triplets/x86-mingw-static.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_ENV_PASSTHROUGH PATH)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)

set(VCPKG_C_FLAGS "-msse2 ")
set(VCPKG_CXX_FLAGS "-msse2 ")

0 comments on commit 9b506f1

Please sign in to comment.