mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-02-27 01:13:08 +00:00
* Add gate to detect changes in source code * Fix action errors --------- Co-authored-by: osmaczko <33099791+osmaczko@users.noreply.github.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
# Cache the Nim compiler built by nimbus-build-system (NBS).
|
|
# Building Nim from source is the slowest part of `make update`.
|
|
# Keyed on the NBS submodule commit — auto-invalidates when NBS is bumped.
|
|
- id: nbs
|
|
run: echo "hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: vendor/nimbus-build-system/vendor/Nim
|
|
key: ${{ runner.os }}-nbs-${{ steps.nbs.outputs.hash }}
|
|
- run: make update
|
|
- run: make all
|
|
|
|
test:
|
|
name: Test
|
|
needs: build
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macOS-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- id: nbs
|
|
run: echo "hash=$(git rev-parse HEAD:vendor/nimbus-build-system)" >> $GITHUB_OUTPUT
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: vendor/nimbus-build-system/vendor/Nim
|
|
key: ${{ runner.os }}-nbs-${{ steps.nbs.outputs.hash }}
|
|
- run: make update
|
|
- run: make tests
|