4jcraft/.github/workflows/build-linux.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

78 lines
1.7 KiB
YAML

name: Build (Linux, x86-64)
# TODO: test with only pull-request
on:
push:
paths: &workflow_paths
- "**.cppm"
- "**.ixx"
- "**.inl"
- "**.mpp"
- "**.ipp"
- "**.tpp"
- "**.txx"
- "**.inc"
- "**.cpp"
- "**.hpp"
- "**.cxx"
- "**.hxx"
- "**.cc"
- "**.hh"
- "**.c"
- "**.h"
- ".github/workflows/build-linux.yml"
- "**/meson.build"
- "flake.nix"
pull_request:
paths: *workflow_paths
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'dev/') }}
jobs:
build-linux-amalgamate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Enter dev-shell
uses: ./.github/actions/enter-devshell
- name: Restore build cache
uses: ./.github/actions/restore-cache
with:
ccache_dir: ${{ runner.temp }}/ccache
- name: Build meson (release)
uses: ./.github/actions/build-meson
with:
dir_name: "build_release"
setup_args: "-Dunity=on -Dunity_size=99999"
build-linux-full:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Enter dev-shell
uses: ./.github/actions/enter-devshell
- name: Restore build cache
uses: ./.github/actions/restore-cache
with:
ccache_dir: ${{ runner.temp }}/ccache
- name: Build meson (debug)
uses: ./.github/actions/build-meson
with:
dir_name: "build_debug"
setup_args: "-Dunity=off"