Skip to content

Commit

Permalink
fix(ci): update cmake setup
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Jun 27, 2024
1 parent 24bdf5f commit 7e697fa
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
build_type: [Debug, Release]
compiler: [msvc]
target: [p2ce, momentum]
target: [p2ce, momentum, revolution]
runs-on: windows-latest
defaults:
run:
Expand Down Expand Up @@ -47,32 +47,27 @@ jobs:
modules: ${{env.QT_MODULES}}
cache: true

- name: Configure CMake [target:p2ce]
if: ${{matrix.target == 'p2ce'}}
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/msvc2019_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_APPID=440000

- name: Configure CMake [target:momentum]
if: ${{matrix.target == 'momentum'}}
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/msvc2019_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_APPID=1802710
- name: Configure CMake
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/msvc2019_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_MOD="${{matrix.target}}"

- name: Build SDK Launcher
working-directory: '${{env.BUILD_DIR}}'
run: |
cmake --build . --config ${{matrix.build_type}} -t sdk_launcher -- -j%NUMBER_OF_PROCESSORS%
cmake --build . --config ${{matrix.build_type}} -t SDKLauncher -- -j%NUMBER_OF_PROCESSORS%
- name: Upload SDK Launcher
uses: actions/upload-artifact@v4
with:
name: 'SDK_Launcher-${{matrix.target}}-Windows-${{matrix.compiler}}-${{matrix.build_type}}'
path: ${{env.BUILD_DIR}}/sdk_launcher.exe
name: 'SDKLauncher-${{matrix.target}}-Windows-${{matrix.compiler}}-${{matrix.build_type}}'
path: ${{env.BUILD_DIR}}/SDKLauncher.exe
retention-days: 7

build-linux:
strategy:
matrix:
build_type: [Debug, Release]
compiler: [gcc]
target: [p2ce, momentum]
target: [p2ce, momentum, revolution]
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
Expand Down Expand Up @@ -102,21 +97,16 @@ jobs:
modules: ${{env.QT_MODULES}}
cache: true

- name: Configure CMake [target:p2ce]
if: ${{matrix.target == 'p2ce'}}
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/gcc_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_APPID=440000

- name: Configure CMake [target:momentum]
if: ${{matrix.target == 'momentum'}}
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/gcc_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_APPID=1802710
- name: Configure CMake
run: cmake -G "Ninja" -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DQT_BASEDIR="${{github.workspace}}/qt/Qt/${{env.QT_VERSION}}/gcc_64" -DSDK_LAUNCHER_USE_LTO=ON -DSDK_LAUNCHER_DEFAULT_MOD="${{matrix.target}}"

- name: Build SDK Launcher
working-directory: '${{env.BUILD_DIR}}'
run: cmake --build . --config ${{matrix.build_type}} -t sdk_launcher -- -j$(nproc)
run: cmake --build . --config ${{matrix.build_type}} -t SDKLauncher -- -j$(nproc)

- name: Fixup Binaries
run: |
chmod +x '${{env.BUILD_DIR}}/sdk_launcher'
chmod +x '${{env.BUILD_DIR}}/SDKLauncher'
# runpath cleanup for the Qt binaries. These are (mostly) wrong, leading to crashes
for f in ${{env.BUILD_DIR}}/*.so*; do
Expand All @@ -131,8 +121,8 @@ jobs:
- name: Upload SDK Launcher
uses: actions/upload-artifact@v4
with:
name: 'SDK_Launcher-${{matrix.target}}-Linux-${{matrix.compiler}}-${{matrix.build_type}}'
path: ${{env.BUILD_DIR}}/sdk_launcher
name: 'SDKLauncher-${{matrix.target}}-Linux-${{matrix.compiler}}-${{matrix.build_type}}'
path: ${{env.BUILD_DIR}}/SDKLauncher
retention-days: 7

deploy:
Expand Down

0 comments on commit 7e697fa

Please sign in to comment.