mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-05 21:43:15 +00:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Build (Linux, x86-64)
|
|
|
|
on:
|
|
push:
|
|
paths: &workflow_paths
|
|
- '**.cpp'
|
|
- '**.h'
|
|
- '**.c'
|
|
- '**.cc'
|
|
- '**.cxx'
|
|
- '**.hh'
|
|
- '**.hpp'
|
|
- '**.hxx'
|
|
- '**.inl'
|
|
- "**meson.build"
|
|
- "flake.nix"
|
|
- '.github/workflows/build-linux.yml'
|
|
|
|
pull_request:
|
|
paths: *workflow_paths
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
CC: ccache clang
|
|
CXX: ccache clang++
|
|
CCACHE_DIR: ${{ runner.temp }}/ccache
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Install system dependencies
|
|
uses: daaku/gh-action-apt-install@v4
|
|
with:
|
|
packages: build-essential ccache python3 python3-pip ninja-build libsdl2-dev libgl-dev libglu1-mesa-dev libpthread-stubs0-dev patchelf
|
|
|
|
- name: Install meson from pip
|
|
run: |
|
|
python -m pip install meson
|
|
|
|
- name: Restore ccache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ runner.temp }}/ccache
|
|
key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-ccache-
|
|
|
|
- name: Configure ccache
|
|
run: ccache -M 5G
|
|
|
|
- name: Configure Meson
|
|
run: meson setup build --wipe --native-file=./scripts/llvm_native.txt
|
|
|
|
- name: Build
|
|
run: meson compile -C build -j $(nproc) -v Minecraft.Client
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: minecraft-client-linux-${{ github.sha }}
|
|
path: build/Minecraft.Client/Minecraft.Client
|
|
retention-days: 7
|