From a5b66ec4625c7372de836937148e1ed7556deb90 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:46:00 -0500 Subject: [PATCH 1/6] revert CI --- .github/workflows/build-linux.yml | 40 ++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index e1ff0b0fd..37d28139b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -22,17 +22,45 @@ on: 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 Nix - uses: cachix/install-nix-action@v31 + - name: Install system dependencies + uses: daaku/gh-action-apt-install@v4 with: - nix_path: nixpkgs=channel:nixos-unstable + 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: nix build --print-build-logs + run: meson compile -C build -j $(nproc) -v Minecraft.Client - - name: Flake integrity - run: nix flake check + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: minecraft-client-linux-${{ github.sha }} + path: build/Minecraft.Client/Minecraft.Client + retention-days: 7 From 1128e602fdabf28a044842856d4b4f58edd8e6e6 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:51:54 -0500 Subject: [PATCH 2/6] overcomplicating it --- .github/workflows/build-linux.yml | 37 +++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 37d28139b..969a9e817 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -40,27 +40,46 @@ jobs: - name: Install meson from pip run: | python -m pip install meson + ccache -M 5G || true - name: Restore ccache uses: actions/cache@v4 with: - path: ${{ runner.temp }}/ccache + path: ~/.ccache key: ${{ runner.os }}-ccache-${{ hashFiles('**/meson.build') }} - restore-keys: | - ${{ runner.os }}-ccache- - - name: Configure ccache - run: ccache -M 5G + - name: Restore meson cache + uses: actions/cache@v4 + with: + path: ~/.cache/meson + key: ${{ runner.os }}-meson-${{ hashFiles('**/meson.build') }} - name: Configure Meson - run: meson setup build --wipe --native-file=./scripts/llvm_native.txt + env: + CC: "ccache clang" + CXX: "ccache clang++" + CCACHE_DIR: ${{ runner.temp }}/ccache + run: | + mkdir -p "$CCACHE_DIR" + export CCACHE_DIR="$CCACHE_DIR" + meson setup build --wipe --native-file=./scripts/llvm_native.txt - - name: Build - run: meson compile -C build -j $(nproc) -v Minecraft.Client + - 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 \ No newline at end of file From cf1d3436f11906d38fd0793684b139a570a21964 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:56:05 -0500 Subject: [PATCH 3/6] remove env field --- .github/workflows/build-linux.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 969a9e817..a7bab7f27 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -23,11 +23,6 @@ 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 From 2ce1b0b2610b255fee9dfd1f413285dbf946a2b3 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:56:53 -0500 Subject: [PATCH 4/6] add libglm-dev --- .github/workflows/build-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index a7bab7f27..4b9475573 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -30,7 +30,7 @@ jobs: - 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 + packages: build-essential ccache python3 python3-pip ninja-build libsdl2-dev libgl-dev libglu1-mesa-dev libpthread-stubs0-dev patchelf libglm-dev - name: Install meson from pip run: | From 4ee9175501625b2eddc7b6467de8c85f6563ae2b Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 22:59:23 -0500 Subject: [PATCH 5/6] don't use apt-install github action --- .github/workflows/build-linux.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 4b9475573..5077b7def 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -28,14 +28,13 @@ jobs: 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 libglm-dev - - - name: Install meson from pip 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 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 From b5b9b66307c1f0b3cd269fd9ed89c9c633a10de7 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Sun, 29 Mar 2026 23:00:46 -0500 Subject: [PATCH 6/6] add libglm dependency again --- .github/workflows/build-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 5077b7def..ece858d39 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -30,7 +30,7 @@ jobs: - 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 + 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