mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +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/**"
|
- "Minecraft.World/**"
|
||||||
- "docs/**"
|
- "docs/**"
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
permissions:
|
permissions:
|
||||||
|
|
|
||||||
31
.github/workflows/build-linux.yml
vendored
31
.github/workflows/build-linux.yml
vendored
|
|
@ -19,6 +19,8 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths: *workflow_paths
|
paths: *workflow_paths
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -32,48 +34,33 @@ jobs:
|
||||||
sudo apt-get update
|
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
|
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
|
python -m pip install meson
|
||||||
# Set a reasonable ccache size
|
|
||||||
ccache -M 5G || true
|
|
||||||
python -m pip install meson
|
|
||||||
|
|
||||||
- name: Restore ccache
|
- name: Restore ccache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: ${{ runner.temp }}/ccache
|
||||||
key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }}
|
key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }}
|
||||||
|
restore-keys: ${{ runner.os }}-ccache-
|
||||||
- name: Restore meson cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.cache/meson
|
|
||||||
key: ${{ runner.os }}-meson-${{ hashFiles('**/meson.build') }}
|
|
||||||
|
|
||||||
- name: Configure Meson
|
- name: Configure Meson
|
||||||
env:
|
env:
|
||||||
CC: "ccache clang"
|
CC: "ccache clang"
|
||||||
CXX: "ccache clang++"
|
CXX: "ccache clang++"
|
||||||
CCACHE_DIR: ${{ runner.temp }}/ccache
|
CC_LD: lld
|
||||||
|
CXX_LD: lld
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "$CCACHE_DIR"
|
meson setup build --wipe
|
||||||
export CCACHE_DIR="$CCACHE_DIR"
|
|
||||||
meson setup build --wipe --native-file=./scripts/llvm_native.txt
|
|
||||||
|
|
||||||
- name: Build with Meson
|
- name: Build with Meson
|
||||||
env:
|
env:
|
||||||
CC: "ccache clang"
|
|
||||||
CXX: "ccache clang++"
|
|
||||||
CCACHE_DIR: ${{ runner.temp }}/ccache
|
CCACHE_DIR: ${{ runner.temp }}/ccache
|
||||||
run: |
|
run: |
|
||||||
export CCACHE_DIR="${{ runner.temp }}/ccache"
|
|
||||||
# Use all available cores for faster parallel builds
|
# Use all available cores for faster parallel builds
|
||||||
meson compile -C build -j $(nproc) -v Minecraft.Client
|
meson compile -C build -j $(nproc) -v Minecraft.Client
|
||||||
|
|
||||||
- name: Install patchelf
|
|
||||||
run: sudo apt-get install -y patchelf
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: minecraft-client-linux-${{ github.sha }}
|
name: minecraft-client-linux-${{ github.sha }}
|
||||||
path: build/Minecraft.Client/Minecraft.Client
|
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:
|
pull_request:
|
||||||
paths: *workflow_paths
|
paths: *workflow_paths
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue