Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-08 20:09:27 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-08 20:09:27 +1100
commit6c562470f3a7cd24ed6501f54422564ed42051ea (patch)
tree2e422b3316b6e77cbc35085a9ce63b4c6d0912d3 /.github
parent89fe1bf15bc458df6c63f1aaeac42a4883efbfd5 (diff)
Merge launcher branch
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_linux.yml36
-rw-r--r--.github/workflows/build_macos.yml76
-rw-r--r--.github/workflows/build_windows.yml81
3 files changed, 107 insertions, 86 deletions
diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml
index dd64b8f..1dc6d68 100644
--- a/.github/workflows/build_linux.yml
+++ b/.github/workflows/build_linux.yml
@@ -24,25 +24,29 @@ jobs:
- name: Install Packages
run: |
sudo apt-get update
- sudo apt-get install -y libgl1-mesa-dev mesa-common-dev libsdl2-dev libglew-dev libvorbis-dev libogg-dev libz3-dev libpng-dev libfreetype-dev libgtest-dev libgmock-dev ninja-build
+ sudo apt-get install -y libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev ninja-build
- - name: Configure Test Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-debug" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES -DCMAKE_BUILD_TYPE=Debug
-
- - name: Build Debug
- run: cmake --build "${{ github.workspace }}/cmake-build-debug" --parallel
-
- - name: Run Unit Tests
- run: ctest --test-dir "${{ github.workspace }}/cmake-build-debug" -L 'NoAssets' --verbose
-
- - name: Cleanup Test Build
- run: rm -Rf "${{ github.workspace }}/cmake-build-debug" "${{ github.workspace }}/dist"
+ - name: sccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ variant: sccache
+ key: ${{ github.job }}-${{ runner.os }}
+ max-size: 2500M
- - name: Configure Release Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-release" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=NO -DCMAKE_BUILD_TYPE=Release
+ - name: vcpkg
+ uses: lukka/run-vcpkg@v11
+ id: runvcpkg
+ with:
+ vcpkgJsonGlob: '**/source/vcpkg.json'
+ vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
- - name: Build Release
- run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+ - name: Run CMake
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ configurePreset: 'linux-release'
+ buildPreset: 'linux-release'
+ testPreset: 'linux-release'
- name: Upload Artifacts
uses: actions/upload-artifact@v4
diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml
index f6031fe..1386e70 100644
--- a/.github/workflows/build_macos.yml
+++ b/.github/workflows/build_macos.yml
@@ -21,26 +21,30 @@ jobs:
with:
submodules: 'recursive'
- - name: Install Packages
- run: brew install sdl2 glew libvorbis lzlib libpng freetype ninja
+ - name: Hire a Ninja
+ run: brew install ninja
- - name: Configure Test Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-debug" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES -DCMAKE_BUILD_TYPE=Debug
-
- - name: Build Debug
- run: cmake --build "${{ github.workspace }}/cmake-build-debug" --parallel
-
- - name: Run Unit Tests
- run: ctest --test-dir "${{ github.workspace }}/cmake-build-debug" -L 'NoAssets' --verbose
-
- - name: Cleanup Test Build
- run: rm -Rf "${{ github.workspace }}/cmake-build-debug" "${{ github.workspace }}/dist"
+ - name: sccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ variant: sccache
+ key: ${{ github.job }}-Intel-${{ runner.os }}
+ max-size: 2500M
- - name: Configure Release Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-release" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=NO -DCMAKE_BUILD_TYPE=Release
+ - name: vcpkg
+ uses: lukka/run-vcpkg@v11
+ id: runvcpkg
+ with:
+ vcpkgJsonGlob: '**/source/vcpkg.json'
+ vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
- - name: Build Release
- run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+ - name: Run CMake
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ configurePreset: 'macos-release'
+ buildPreset: 'macos-release'
+ testPreset: 'macos-release'
- name: Upload Artifacts
uses: actions/upload-artifact@v4
@@ -57,26 +61,30 @@ jobs:
with:
submodules: 'recursive'
- - name: Install Packages
- run: brew install sdl2 glew libvorbis lzlib libpng freetype ninja
+ - name: Hire a Ninja
+ run: brew install ninja
- - name: Configure Test Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-debug" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES -DCMAKE_BUILD_TYPE=Debug
-
- - name: Build Debug
- run: cmake --build "${{ github.workspace }}/cmake-build-debug" --config "Debug" --parallel
-
- - name: Run Unit Tests
- run: ctest --test-dir "${{ github.workspace }}/cmake-build-debug" -L 'NoAssets' --verbose --build-config "Debug"
-
- - name: Cleanup Test Build
- run: rm -Rf "${{ github.workspace }}/cmake-build-debug" "${{ github.workspace }}/dist"
+ - name: sccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ variant: sccache
+ key: ${{ github.job }}-ARM-${{ runner.os }}
+ max-size: 2500M
- - name: Configure Release Build
- run: cmake -G "Ninja" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-release" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES -DCMAKE_BUILD_TYPE=Release
+ - name: vcpkg
+ uses: lukka/run-vcpkg@v11
+ id: runvcpkg
+ with:
+ vcpkgJsonGlob: '**/source/vcpkg.json'
+ vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
- - name: Build Release
- run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+ - name: Run CMake
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ configurePreset: 'macos-arm-release'
+ buildPreset: 'macos-arm-release'
+ testPreset: 'macos-arm-release'
- name: Upload Artifacts
uses: actions/upload-artifact@v4
diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml
index 76bb4cc..b17505d 100644
--- a/.github/workflows/build_windows.yml
+++ b/.github/workflows/build_windows.yml
@@ -13,56 +13,65 @@ on:
jobs:
build:
- name: OpenStarbound Windows x86_64
+ name: Build OpenStarbound Windows x64
runs-on: windows-latest
steps:
- - uses: actions/checkout@v4
+ - name: Checkout
+ uses: actions/checkout@v4
with:
submodules: 'recursive'
- - name: Configure Test Build
- run: >
- cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-debug"
- -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
- -DVCPKG_OVERLAY_TRIPLETS="${{ github.workspace }}\triplets"
- -DVCPKG_TARGET_TRIPLET=x64-windows-mixed-md
- -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
- -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install"
- -DCMAKE_VERBOSE_MAKEFILE=YES
- -DBUILD_TESTING=YES
+ - name: Hire a Ninja
+ run: |
+ choco install ninja
+ ninja.exe --version
- - name: Build Debug
- run: cmake --build "${{ github.workspace }}/cmake-build-debug" --config "Debug" --parallel
+ - name: sccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ variant: sccache
+ key: ${{ github.job }}-${{ runner.os }}
+ max-size: 2500M
- - name: Run Unit Tests
- run: ctest --test-dir "${{ github.workspace }}/cmake-build-debug" -L 'NoAssets' --verbose --build-config "Debug"
+ - uses: ilammy/msvc-dev-cmd@v1
- - name: Cleanup Test Build
- run: |
- Remove-Item "${{ github.workspace }}\cmake-build-debug" -Recurse
- Remove-Item "${{ github.workspace }}\dist" -Recurse
+ - name: vcpkg
+ uses: lukka/run-vcpkg@v11
+ id: runvcpkg
+ with:
+ vcpkgJsonGlob: '**/source/vcpkg.json'
+ vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
- - name: Configure Release Build
- run: >
- cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-relwithdebinfo"
- -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
- -DVCPKG_OVERLAY_TRIPLETS="${{ github.workspace }}\triplets"
- -DVCPKG_TARGET_TRIPLET=x64-windows-mixed-md
- -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL"
- -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install"
- -DCMAKE_VERBOSE_MAKEFILE=YES
- -DBUILD_TESTING=OFF
- -DSTAR_ENABLE_STEAM_INTEGRATION=ON
- -DSTAR_ENABLE_DISCORD_INTEGRATION=ON
- -DCMAKE_INCLUDE_PATH="${{ github.workspace }}\lib\windows\include"
- -DCMAKE_LIBRARY_PATH="${{ github.workspace }}\lib\windows"
+ - name: Run CMake
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ configurePreset: 'windows-release'
+ buildPreset: 'windows-release'
+ testPreset: 'windows-release'
- - name: Build Release
- run: cmake --build "${{ github.workspace }}/cmake-build-relwithdebinfo" --config "RelWithDebInfo" --parallel
+ - name: Tidy Artifacts
+ working-directory: ${{ github.workspace }}
+ run: scripts\ci\windows\tidy.bat
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Dev-Windows-x64
path: dist/*
+
+ - name: Assemble Install Files
+ working-directory: ${{ github.workspace }}
+ run: scripts\ci\windows\assemble.bat
+
+ - name: Create Installer
+ working-directory: ${{ github.workspace }}
+ run: |
+ & "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /Oinstaller scripts\inno\setup.iss
+
+ - name: Upload Installer
+ uses: actions/upload-artifact@v4
+ with:
+ name: Installer
+ path: installer/* \ No newline at end of file