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

summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@gdata.de>2024-02-18 13:55:01 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 14:11:19 +0100
commitef82ae3aeb835290671f09ce12fabae25f914396 (patch)
treeff8586f994164f67d100f6b478ca607afa41bd57 /.github
parente2251a0e8bab878b453debd9211e0ba34564d08c (diff)
Add GitHub Actions build workflows
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_linux.yml51
-rw-r--r--.github/workflows/build_macos.yml85
-rw-r--r--.github/workflows/build_windows.yml48
3 files changed, 184 insertions, 0 deletions
diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml
new file mode 100644
index 0000000..dd64b8f
--- /dev/null
+++ b/.github/workflows/build_linux.yml
@@ -0,0 +1,51 @@
+name: Ubuntu Linux
+
+on:
+ push:
+ branches:
+ - "*"
+ tags:
+ - "*"
+
+ pull_request:
+ branches:
+ - "*"
+
+jobs:
+ build:
+ name: OpenStarbound Linux x86_64
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - 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
+
+ - 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: 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: Build Release
+ run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Dev-Linux-x86_64
+ path: dist/*
diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml
new file mode 100644
index 0000000..f6031fe
--- /dev/null
+++ b/.github/workflows/build_macos.yml
@@ -0,0 +1,85 @@
+name: macOS
+
+on:
+ push:
+ branches:
+ - "*"
+ tags:
+ - "*"
+
+ pull_request:
+ branches:
+ - "*"
+
+jobs:
+ build-intel:
+ name: OpenStarbound macOS x86_64
+ runs-on: macos-13
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - name: Install Packages
+ run: brew install sdl2 glew libvorbis lzlib libpng freetype 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: 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: Build Release
+ run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Dev-macOS-Intel
+ path: dist/*
+
+ build-arm:
+ name: OpenStarbound macOS arm64
+ runs-on: macos-14
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - name: Install Packages
+ run: brew install sdl2 glew libvorbis lzlib libpng freetype 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: 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: Build Release
+ run: cmake --build "${{ github.workspace }}/cmake-build-release" --parallel
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Dev-macOS-Silicon
+ path: dist/* \ No newline at end of file
diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml
new file mode 100644
index 0000000..ad92d65
--- /dev/null
+++ b/.github/workflows/build_windows.yml
@@ -0,0 +1,48 @@
+name: Windows
+
+on:
+ push:
+ branches:
+ - "*"
+ tags:
+ - "*"
+
+ pull_request:
+ branches:
+ - "*"
+
+jobs:
+ build:
+ name: OpenStarbound Windows x86_64
+ runs-on: windows-latest
+
+ steps:
+ - 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_TARGET_TRIPLET=x64-windows -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES
+
+ - 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: |
+ Remove-Item "${{ github.workspace }}\cmake-build-debug" -Recurse
+ Remove-Item "${{ github.workspace }}\dist" -Recurse
+
+ - name: Configure Release Build
+ run: cmake -G "Visual Studio 17 2022" -A "X64" -S "${{ github.workspace }}/source" -B "${{ github.workspace }}/cmake-build-release" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" -DCMAKE_VERBOSE_MAKEFILE=YES -DBUILD_TESTING=YES
+
+ - name: Build Release
+ run: cmake --build "${{ github.workspace }}/cmake-build-release" --config "Release" --parallel
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Dev-Windows-x64
+ path: dist/*