4jcraft/.github/workflows/release-linux.yml
/home/neo 6ccc93e6f6
Some checks failed
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run
Publish Documentation / build (push) Has been cancelled
Format Check / clang-format (push) Has been cancelled
fix: actually fix nightly CI (#398)
* fix: actually fix nightly CI

* fix(ci): exclude object files
2026-04-04 17:05:34 -05:00

86 lines
2.3 KiB
YAML

name: Release Nightly (Linux, x86-64)
on:
push:
paths: &workflow_paths
- '**.cpp'
- '**.h'
- '**.c'
- '**.cc'
- '**.cxx'
- '**.hh'
- '**.hpp'
- '**.hxx'
- '**.inl'
- "**meson.build"
- "flake.nix"
- '.github/workflows/release-linux.yml'
workflow_dispatch:
jobs:
release-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install system dependencies
run: |
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
- name: Install LLVM + libc++
run: |
wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 20
sudo apt-get install -y libc++-20-dev libc++abi-20-dev
- name: Restore ccache
uses: actions/cache@v5
with:
path: ${{ runner.temp }}/ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }}
restore-keys: ${{ runner.os }}-ccache-
- name: Configure Meson
env:
CC: "ccache clang"
CXX: "ccache clang++"
CC_LD: lld
CXX_LD: lld
run: |
meson setup build --native-file=scripts/llvm_native.txt --wipe
- name: Build with Meson
env:
CCACHE_DIR: ${{ runner.temp }}/ccache
run: |
export CCACHE_DIR="${{ runner.temp }}/ccache"
meson compile -C build -j $(nproc)
- name: Install patchelf
run: sudo apt-get install -y patchelf
- name: Package artifact
run: |
cd build/targets/app
zip -r ../../../minecraft-client-linux.zip . --exclude "./Minecraft.Client.p/*"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: minecraft-client-linux-${{ github.sha }}
path: minecraft-client-linux.zip
retention-days: 7
- name: Create nightly release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: Nightly
prerelease: true
files: minecraft-client-linux.zip