mirror of
https://github.com/logos-messaging/nim-ffi.git
synced 2026-06-20 08:19:55 +00:00
86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
jobs:
|
|
alloc:
|
|
name: Alloc
|
|
uses: ./.github/workflows/test.yml
|
|
with:
|
|
test: test_alloc
|
|
|
|
ffi-context:
|
|
name: FFI Context
|
|
uses: ./.github/workflows/test.yml
|
|
with:
|
|
test: test_ffi_context
|
|
|
|
gc-compat:
|
|
name: GC Compatibility
|
|
uses: ./.github/workflows/test.yml
|
|
with:
|
|
test: test_gc_compat
|
|
|
|
serial:
|
|
name: Serial
|
|
uses: ./.github/workflows/test.yml
|
|
with:
|
|
test: test_serial
|
|
|
|
ctx-validation:
|
|
name: Context Validation
|
|
uses: ./.github/workflows/test.yml
|
|
with:
|
|
test: test_ctx_validation
|
|
|
|
cpp-e2e:
|
|
name: C++ E2E
|
|
# Codegen output doesn't vary with mm and CMake/FetchContent is most
|
|
# reliable on Linux, so we run a single config rather than the full matrix.
|
|
runs-on: ubuntu-22.04
|
|
env:
|
|
NIMBLE_VERSION: '0.22.3'
|
|
NIM_VERSION: '2.2.4'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Nim
|
|
uses: jiro4989/setup-nim-action@v2
|
|
with:
|
|
nim-version: ${{ env.NIM_VERSION }}
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install Nimble ${{ env.NIMBLE_VERSION }}
|
|
run: |
|
|
cd /tmp && nimble install "nimble@${{ env.NIMBLE_VERSION }}" -y
|
|
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
|
|
|
|
- name: Cache nimble deps
|
|
id: cache-nimbledeps
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
nimbledeps/
|
|
nimble.paths
|
|
key: ${{ runner.os }}-nimbledeps-${{ env.NIM_VERSION }}-${{ hashFiles('*.nimble') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nimbledeps-${{ env.NIM_VERSION }}-
|
|
${{ runner.os }}-nimbledeps-
|
|
|
|
- name: Install nimble deps
|
|
if: steps.cache-nimbledeps.outputs.cache-hit != 'true'
|
|
run: nimble setup --localdeps -y
|
|
|
|
- name: Cache CMake FetchContent (GoogleTest + nlohmann_json)
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: tests/e2e/cpp/build/_deps
|
|
key: ${{ runner.os }}-cpp-e2e-deps-${{ hashFiles('tests/e2e/cpp/CMakeLists.txt') }}
|
|
|
|
- name: Run C++ e2e tests
|
|
run: nimble test_cpp_e2e -y
|