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

summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-05-31 06:34:48 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2025-05-31 06:34:48 +1000
commitd9481850f365b4fe0424d299480d3cb114b1c446 (patch)
tree826680e32713b6c21c6589b780ac7b7138e7e133 /.github
parentc8aea48d84a1da84759a6a15b95212ca43082581 (diff)
default to GCC on Linux for now, move to optional Clang build action
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml88
1 files changed, 84 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6474e7e..42e506c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,8 +5,12 @@ on:
inputs:
linux:
type: boolean
- description: Linux
+ description: Linux (GCC)
default: true
+ linux_clang:
+ type: boolean
+ description: Linux (Clang)
+ default: false
windows:
type: boolean
description: Windows
@@ -162,7 +166,83 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
- name: OpenStarbound-Linux
+ name: OpenStarbound-Linux-GCC
+ path: dist.tar
+
+ - name: Run Tests
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ testPreset: 'linux-release'
+
+ - name: Assemble Files
+ working-directory: ${{ github.workspace }}
+ run: scripts/ci/linux/assemble.sh
+
+ - name: Upload Client Files
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Linux-GCC-Client
+ path: client.tar
+
+ - name: Upload Server Files
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Linux-GCC-Server
+ path: server.tar
+
+ build_linux_Clang:
+ name: Build OpenStarbound Linux Clang x86_64
+ runs-on: ubuntu-22.04
+ if: ${{ inputs.linux_clang == true }}
+ env:
+ CC: clang
+ CXX: clang++
+
+ steps:
+ - name: Install Packages
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y pkg-config libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libsdl2-dev
+
+ - name: Install CMake & Ninja
+ uses: lukka/get-cmake@latest
+ with:
+ cmakeVersion: 3.29.2
+
+ - uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - name: sccache
+ uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ variant: sccache
+ key: ${{ github.job }}-${{ runner.os }}
+ max-size: 250M
+
+ - name: vcpkg
+ uses: lukka/run-vcpkg@v11
+ id: runvcpkg
+ with:
+ vcpkgJsonGlob: '**/source/vcpkg.json'
+ vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
+
+ - name: Run CMake
+ uses: lukka/run-cmake@v10
+ with:
+ cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
+ configurePreset: 'linux-release-clang'
+ buildPreset: 'linux-release-clang'
+
+ - name: Prepare Artifacts
+ working-directory: ${{ github.workspace }}
+ run: tar -cvf dist.tar dist
+
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: OpenStarbound-Linux-Clang
path: dist.tar
- name: Run Tests
@@ -178,13 +258,13 @@ jobs:
- name: Upload Client Files
uses: actions/upload-artifact@v4
with:
- name: OpenStarbound-Linux-Client
+ name: OpenStarbound-Linux-Clang-Client
path: client.tar
- name: Upload Server Files
uses: actions/upload-artifact@v4
with:
- name: OpenStarbound-Linux-Server
+ name: OpenStarbound-Linux-Clang-Server
path: server.tar
build-mac-intel: