4jcraft/.github/workflows/build-linux.yml
2026-04-04 13:01:48 -05:00

92 lines
2 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:
- name: Cache .git folder
uses: actions/cache@v5
with:
path: .git
key: ${{ runner.os }}-git-${{ github.sha }}
restore-keys: ${{ runner.os }}-git-
- 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: Compile
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:
- name: Cache .git folder
uses: actions/cache@v5
with:
path: .git
key: ${{ runner.os }}-git-${{ github.sha }}
restore-keys: ${{ runner.os }}-git-
- 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: Compile
uses: ./.github/actions/build-meson
with:
dir_name: "build_debug"
setup_args: "-Dunity=off"