mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-16 19:45:46 +01:00
Mainly so the makefile is a bit less esoteric to use, debugging flags must be specified manually. changed: - `$RM` for calling `rm` - removed unused `$ISWIN` - renamed `test` to `check` - added `install` and `install-strip` recipes, which for now remain empty - added `-g` to `$CFLAGS`, since it helps debugging, and in case of failures makes bug report less of a headache. I decided to not modify it further so "specialised tools" don't need to store files in the git repo, which seemed to complicate logic. This is the same reason to why I chose to not adapt clean in a way to introduce `mostlyclean`.
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
compile-and-test:
|
|
strategy:
|
|
fail-fast: false # disable fail fast, so feedback is provided for all matrix combinations
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
cc: cc
|
|
- os: ubuntu-24.04-arm
|
|
cc: cc
|
|
- os: windows-latest
|
|
cc: gcc
|
|
- os: windows-11-arm
|
|
cc: gcc
|
|
# - os: macos-latest
|
|
# cc: cc
|
|
env:
|
|
CC: ${{matrix.cc}}
|
|
runs-on: ${{matrix.os}}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 1
|
|
|
|
- name: "Linux: install deps"
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y libwayland-dev libxkbcommon-dev xorg-dev cmake xxd
|
|
|
|
- name: get submodule hash
|
|
id: get-hash
|
|
run: echo "HASH=$(git submodule | sha1sum | cut -d' ' -f1)" >$GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
- uses: actions/cache@v4
|
|
id: cache-deps
|
|
with:
|
|
path: lib/obj/
|
|
# I swear to god, if runner.arch displays x64 for x86_64, I will eat a potato.
|
|
# note: it is... fucking shit.
|
|
key: ${{runner.os}}_${{runner.arch}}-lib/obj-${{steps.get-hash.outputs.HASH}}
|
|
restore-keys: ${{runner.os}}_${{runner.arch}}-lib/obj-
|
|
|
|
- run: make -Bj libs
|
|
if: steps.cache-deps.outputs.cache-hit != 'true' && runner.os != 'Windows'
|
|
- run: make -Bj2 libs # compile fewer cores, to save memory.
|
|
if: steps.cache-deps.outputs.cache-hit != 'true' && runner.os == 'Windows'
|
|
|
|
- run: make -j all
|
|
- run: make -j check
|