mirror of
https://github.com/logos-storage/nim-libplum.git
synced 2026-07-24 00:03:11 +00:00
* Tests: Dockerfile: Remove cmake from deps.
* Tests: Dockerfile: Replace manual libplum building with nimble task.
* Build libplum without cmake.
* Use {.compile.} to compile libplum as part of tha package; remove separate build task.
* Rewrite flags construction, pass flags to compile, remove passC.
* Add localPassC.
* Combine libplum units to libplum_units.c.
* Tests: Dockerfile: Add the units file to the image.
* Add missing flags.
* CI: Remove redundant cmake invocations.
* Remove redundant nimble task invocation.
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Nim
|
|
uses: jiro4989/setup-nim-action@v2
|
|
with:
|
|
nim-version: "2.2.10"
|
|
|
|
- name: Install dependencies
|
|
run: nimble setup -y
|
|
|
|
- name: Unit tests
|
|
# same reason as integration tests: nimble exits with code 0 even on failure.
|
|
run: |
|
|
nim c -o:tests/test_plum tests/test_plum.nim
|
|
./tests/test_plum
|
|
|
|
- name: Integration tests
|
|
# we call docker directly instead of nimble testIntegration because nimble
|
|
# exits with code 0 even when exec() fails, which would make CI pass on failure.
|
|
run: |
|
|
docker build -t libplum -f tests/Dockerfile .
|
|
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_PCP=1 libplum
|
|
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_UPNP=1 libplum
|
|
docker run --rm --cap-add=NET_ADMIN -e TEST_MINIUPNP_NATPMP=1 libplum
|