4jcraft/.github/actions/build-meson/action.yml
Aydin Y. c53e1e5905
Ci/make build linux use flake.nix (#394)
* make `build-linux` use `flake.nix`

* fix: `on pull_request` not `on pull-request`

* fix: shouldn't declare paths for a list

* fix: typo in release job build path

* fix: move ccache dir creation to `restore-cache.yml`

* fix: `runner.temp` should be `RUNNER_TEMP`

* fix: env vars should be constructed in the j*bs

* fix: use cache dir directly

* fix: remove "**.c++" and "**.h++"

* fix: remove `.yml` extension from local actions

* fix: composite actions should use composite syntax

* fix: move build-meson back into composite

* fix: add `nix_path` to nix install step

* fix: move composite workflows into `.github/actions`

* fix: move actions into a directory name after them and then rename them
to action

* fix: add a shell for each run step

* fix: use single-quote strings in interpolation

* fix: use nix as the shell for compilation

* make `build-linux` use `flake.nix`

* fix: `on pull_request` not `on pull-request`

* fix: shouldn't declare paths for a list

* fix: typo in release job build path

* fix: move ccache dir creation to `restore-cache.yml`

* fix: `runner.temp` should be `RUNNER_TEMP`

* fix: env vars should be constructed in the j*bs

* fix: use cache dir directly

* fix: remove "**.c++" and "**.h++"

* fix: remove `.yml` extension from local actions

* fix: composite actions should use composite syntax

* fix: move build-meson back into composite

* fix: add `nix_path` to nix install step

* fix: move composite workflows into `.github/actions`

* fix: move actions into a directory name after them and then rename them
to action

* fix: add a shell for each run step

* fix: use single-quote strings in interpolation

* fix: use nix as the shell for compilation

* fix: UI_REPEAT constant linkage

* make `build-linux` use `flake.nix`

* fix: `on pull_request` not `on pull-request`

* fix: shouldn't declare paths for a list

* fix: typo in release job build path

* fix: move ccache dir creation to `restore-cache.yml`

* fix: `runner.temp` should be `RUNNER_TEMP`

* fix: env vars should be constructed in the j*bs

* fix: use cache dir directly

* fix: remove "**.c++" and "**.h++"

* fix: remove `.yml` extension from local actions

* fix: composite actions should use composite syntax

* fix: move build-meson back into composite

* fix: add `nix_path` to nix install step

* fix: move composite workflows into `.github/actions`

* fix: move actions into a directory name after them and then rename them
to action

* fix: add a shell for each run step

* fix: use single-quote strings in interpolation

* fix: use nix as the shell for compilation

* make `build-linux` use `flake.nix`

* fix: `on pull_request` not `on pull-request`

* fix: shouldn't declare paths for a list

* fix: typo in release job build path

* fix: move ccache dir creation to `restore-cache.yml`

* fix: `runner.temp` should be `RUNNER_TEMP`

* fix: env vars should be constructed in the j*bs

* fix: use cache dir directly

* fix: remove "**.c++" and "**.h++"

* fix: remove `.yml` extension from local actions

* fix: composite actions should use composite syntax

* fix: move build-meson back into composite

* fix: add `nix_path` to nix install step

* fix: move composite workflows into `.github/actions`

* fix: move actions into a directory name after them and then rename them
to action

* fix: add a shell for each run step

* fix: use single-quote strings in interpolation

* fix: use nix as the shell for compilation

* ci: use unity/no-unity instead of release/debug

* rename build-linux jobs

---------

Co-authored-by: Tropical <42101043+tropicaaal@users.noreply.github.com>
2026-04-04 12:53:41 -05:00

39 lines
1 KiB
YAML

name: "Build Meson"
description: "Builds the project using Meson"
inputs:
dir_name:
description: "The name of the directory to setup meson in"
required: true
type: string
setup_args:
description: "The args to additionally pass to meson"
required: false
type: string
upload:
description: "Upload the executable"
required: false
default: true
type: boolean
runs:
using: "composite"
steps:
- name: Setup build-directory
shell: nix develop --command bash -e {0}
run: meson setup ${{ inputs.dir_name }} --wipe ${{ inputs.setup_args }}
- name: Compile directory
shell: nix develop --command bash -e {0}
run: meson compile -C ${{ inputs.dir_name }} -j $(nproc) -v Minecraft.Client
- name: Upload executable
if: ${{ inputs.upload }}
uses: actions/upload-artifact@v4
with:
name: minecraft-client-linux-${{ inputs.dir_name }}-${{ github.sha }}
path: ${{ inputs.dir_name }}/Minecraft.Client/Minecraft.Client
retention-days: 7