mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 06:15:47 +01:00
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
env:
|
|
VCPKG_DISABLE_METRICS: 1
|
|
VCPKG_ROOT: ${{github.workspace}}/.vcpkg
|
|
DEPS_VCPKG: glfw3:x64-linux-dynamic glfw3:x64-mingw-static
|
|
jobs:
|
|
#
|
|
# the mega job containing all things we need to do, since setting up a single system is more efficient than installing the same stuff on multiple ones
|
|
#
|
|
exec-ci-tasks:
|
|
runs-on: ubuntu-latest
|
|
container: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
|
steps:
|
|
#
|
|
# general setup
|
|
#
|
|
- uses: actions/checkout@v4
|
|
#
|
|
# VCPKG setup
|
|
#
|
|
- id: gen-keys
|
|
run: echo "HASH_VCPKG=vcpkg-$(echo "$DEPS_VCPKG" | sha256sum | cut -d ' ' -f1)" >>"$GITHUB_OUTPUT"
|
|
# load the vcpkg cache
|
|
- uses: actions/cache@v4
|
|
id: vcpkg-cache
|
|
with:
|
|
path: ${{env.VCPKG_ROOT}}
|
|
key: ${{steps.gen-keys.outputs.HASH_VCPKG}}
|
|
restore-keys: vcpkg-
|
|
# setup vcpkg if the cache didn't hit
|
|
- if: steps.vcpkg-cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT"
|
|
"$VCPKG_ROOT/bootstrap-vcpkg.sh"
|
|
"$VCPKG_ROOT/vcpkg" install $DEPS_VCPKG
|
|
#
|
|
# compilation
|
|
#
|
|
- run: make compile MARCH=x86_64 KERNEL=linux CC=x86_64-linux-gnu-gcc -j
|
|
- run: make compile MARCH=x86_64 KERNEL=mingw CC=x86_64-w64-mingw32-gcc -j
|
|
#
|
|
# executing unit tests
|
|
#
|
|
- run: make run MARCH=x86_64 KERNEL=linux CC=x86_64-linux-gnu-gcc DEBUG=test -j
|
|
# WARN: not testing windows, probably should do that
|