mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-04 19:33:07 +00:00
- Adds cbindings tests to the makefile so they can be run locally, eg with make testLibstorage or make testAll - Remove the separate workflow for running these tests in ci, opting instead to run them along with unit and integration tests
103 lines
2.5 KiB
YAML
103 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
cache_nonce: 0 # Allows for easily busting actions/cache caches
|
|
nim_version: v2.2.4
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
|
|
matrix:
|
|
name: Compute matrix
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.matrix.outputs.matrix }}
|
|
cache_nonce: ${{ env.cache_nonce }}
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
- name: Compute matrix
|
|
id: matrix
|
|
run: |
|
|
echo 'matrix<<EOF' >> $GITHUB_OUTPUT
|
|
tools/scripts/ci-job-matrix.sh >> $GITHUB_OUTPUT
|
|
echo 'EOF' >> $GITHUB_OUTPUT
|
|
|
|
build:
|
|
needs: matrix
|
|
uses: ./.github/workflows/ci-reusable.yml
|
|
with:
|
|
matrix: ${{ needs.matrix.outputs.matrix }}
|
|
cache_nonce: ${{ needs.matrix.outputs.cache_nonce }}
|
|
|
|
linting:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'pull_request'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Check `nph` formatting
|
|
uses: arnetheduck/nph-action@v1
|
|
with:
|
|
version: latest
|
|
options: "codex/ tests/"
|
|
fail: true
|
|
suggest: true
|
|
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Setup Nimbus Build System
|
|
uses: ./.github/actions/nimbus-build-system
|
|
with:
|
|
os: linux
|
|
nim_version: ${{ env.nim_version }}
|
|
coverage: true
|
|
|
|
- name: Generate coverage data
|
|
run: |
|
|
# make -j${ncpu} coverage
|
|
make -j${ncpu} coverage-script
|
|
shell: bash
|
|
|
|
- name: Upload coverage data to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
directory: ./coverage/
|
|
fail_ci_if_error: true
|
|
files: ./coverage/coverage.f.info
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
verbose: true
|
|
|
|
cbinding:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Setup Nimbus Build System
|
|
uses: ./.github/actions/nimbus-build-system
|
|
with:
|
|
os: linux
|
|
nim_version: ${{ env.nim_version }}
|