mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-10 22:17:13 +00:00
Merge pull request #366 from TheComputerGuy96/fix/ci-meson
CI improvements
This commit is contained in:
commit
bedd46fcec
2
.github/workflows/build-doxygen.yml
vendored
2
.github/workflows/build-doxygen.yml
vendored
|
|
@ -9,6 +9,8 @@ on:
|
|||
- "Minecraft.World/**"
|
||||
- "docs/**"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
|
|
|
|||
31
.github/workflows/build-linux.yml
vendored
31
.github/workflows/build-linux.yml
vendored
|
|
@ -19,6 +19,8 @@ on:
|
|||
pull_request:
|
||||
paths: *workflow_paths
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -32,48 +34,33 @@ jobs:
|
|||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential ccache python3 python3-pip ninja-build libsdl2-dev libgl-dev libglu1-mesa-dev libpthread-stubs0-dev libglm-dev
|
||||
python -m pip install meson
|
||||
# Set a reasonable ccache size
|
||||
ccache -M 5G || true
|
||||
python -m pip install meson
|
||||
|
||||
- name: Restore ccache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
path: ${{ runner.temp }}/ccache
|
||||
key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }}
|
||||
|
||||
- name: Restore meson cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/meson
|
||||
key: ${{ runner.os }}-meson-${{ hashFiles('**/meson.build') }}
|
||||
restore-keys: ${{ runner.os }}-ccache-
|
||||
|
||||
- name: Configure Meson
|
||||
env:
|
||||
CC: "ccache clang"
|
||||
CXX: "ccache clang++"
|
||||
CCACHE_DIR: ${{ runner.temp }}/ccache
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
run: |
|
||||
mkdir -p "$CCACHE_DIR"
|
||||
export CCACHE_DIR="$CCACHE_DIR"
|
||||
meson setup build --wipe --native-file=./scripts/llvm_native.txt
|
||||
meson setup build --wipe
|
||||
|
||||
- name: Build with Meson
|
||||
env:
|
||||
CC: "ccache clang"
|
||||
CXX: "ccache clang++"
|
||||
CCACHE_DIR: ${{ runner.temp }}/ccache
|
||||
run: |
|
||||
export CCACHE_DIR="${{ runner.temp }}/ccache"
|
||||
# Use all available cores for faster parallel builds
|
||||
meson compile -C build -j $(nproc) -v Minecraft.Client
|
||||
|
||||
- name: Install patchelf
|
||||
run: sudo apt-get install -y patchelf
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: minecraft-client-linux-${{ github.sha }}
|
||||
path: build/Minecraft.Client/Minecraft.Client
|
||||
retention-days: 7
|
||||
retention-days: 7
|
||||
|
|
|
|||
2
.github/workflows/clang-format.yml
vendored
2
.github/workflows/clang-format.yml
vendored
|
|
@ -19,6 +19,8 @@ on:
|
|||
pull_request:
|
||||
paths: *workflow_paths
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
Loading…
Reference in a new issue