hardcode vcpkg commit id again because ok fine #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- name: Windows Build | |
os: windows-latest | |
architecture: x64 | |
artifact: windows | |
upload_path_suffix: '/*' | |
- name: Linux Build | |
os: ubuntu-24.04 | |
architecture: x64 | |
artifact: linux | |
upload_path_suffix: '/*' | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev mesa-common-dev libicu-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libbz2-dev | |
- name: Set up MSVC for Windows | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup cmake | |
uses: lukka/get-cmake@latest | |
- name: Setup vcpkg | |
if: runner.os == 'Windows' | |
uses: lukka/[email protected] | |
with: | |
vcpkgGitCommitId: '80d54ff62d528339c626a6fbc3489a7f25956ade' | |
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | |
vcpkgJsonGlob: '**/vcpkg.json' | |
- name: Integrate vcpkg | |
if: runner.os == 'Windows' | |
run: | | |
vcpkg integrate install | |
- name: Run CMake | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
buildDirectory: '${{ github.workspace }}/build' | |
useVcpkgToolchainFile: true | |
cmakeAppendedArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release' | |
- name: Create App Package Linux | |
if: runner.os == 'Linux' | |
run: | | |
mkdir booldozer-build | |
cp -r res booldozer-build/res | |
cp build/booldozer booldozer-build/booldozer | |
- name: Create App Package Windows | |
if: runner.os == 'Windows' | |
run: | | |
mkdir booldozer-build | |
cp -r res booldozer-build/res | |
cp build/booldozer.exe booldozer-build/booldozer.exe | |
cp build/*.dll booldozer-build | |
- name: Upload App Windows | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: booldozer-windows | |
path: booldozer-build | |
- name: Upload App Linux | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: booldozer-linux | |
path: booldozer-build |