|
| 1 | +name: rapidyaml |
| 2 | + |
| 3 | +defaults: |
| 4 | + run: |
| 5 | + shell: bash -xeo pipefail {0} |
| 6 | +'on': |
| 7 | + workflow_dispatch: null |
| 8 | + push: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + pull_request: |
| 12 | + |
| 13 | +jobs: |
| 14 | + |
| 15 | + # check that the spec'ed version of rapidyaml passes its own tests |
| 16 | + ryml: |
| 17 | + runs-on: ubuntu-24.04 |
| 18 | + if: always() |
| 19 | + continue-on-error: false |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + - bt: Debug |
| 25 | + - bt: Release |
| 26 | + steps: |
| 27 | + - name: checkout (action) |
| 28 | + uses: actions/checkout@v4 |
| 29 | + with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched |
| 30 | + - name: checkout rapidyaml |
| 31 | + run: | |
| 32 | + cd rapidyaml/native |
| 33 | + make rapidyaml |
| 34 | + - name: configure |
| 35 | + run: | |
| 36 | + cd rapidyaml/native/rapidyaml |
| 37 | + cmake -B build -D CMAKE_BUILD_TYPE=${{matrix.bt}} -D RYML_BUILD_TESTS=ON |
| 38 | + - name: build |
| 39 | + run: | |
| 40 | + cd rapidyaml/native/rapidyaml |
| 41 | + cmake --build build --target ryml-test-build --parallel --verbose |
| 42 | + - name: run tests |
| 43 | + run: | |
| 44 | + cd rapidyaml/native/rapidyaml |
| 45 | + cmake --build build --target ryml-test-run |
| 46 | +
|
| 47 | + # run the c++ tests, also in Debug to test with assertions |
| 48 | + cpp: |
| 49 | + runs-on: ubuntu-24.04 |
| 50 | + if: always() |
| 51 | + continue-on-error: false |
| 52 | + strategy: |
| 53 | + fail-fast: false |
| 54 | + matrix: |
| 55 | + include: |
| 56 | + - bt: Debug |
| 57 | + - bt: Release |
| 58 | + steps: |
| 59 | + - name: checkout (action) |
| 60 | + uses: actions/checkout@v4 |
| 61 | + with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched |
| 62 | + - name: check jni header up to date |
| 63 | + run: make -C rapidyaml/native -B jni jnicheck |
| 64 | + - name: get rapidyaml |
| 65 | + run: make -C rapidyaml/native rapidyaml |
| 66 | + - name: run c++ tests, static ----------------------------- |
| 67 | + run: echo |
| 68 | + - name: cfg c++, static |
| 69 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-static |
| 70 | + - name: build c++ tests, static |
| 71 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-static |
| 72 | + - name: run c++ tests, static |
| 73 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static |
| 74 | + - name: run c++ tests, static with timing |
| 75 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-static-timing |
| 76 | + - name: run c++ tests, shared ----------------------------- |
| 77 | + run: echo |
| 78 | + - name: cfg c++, shared |
| 79 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native cfg-shared |
| 80 | + - name: build c++ tests, shared |
| 81 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native build-shared |
| 82 | + - name: run c++ tests, shared |
| 83 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared |
| 84 | + - name: run c++ tests, shared with timing |
| 85 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml/native test-shared-timing |
| 86 | + |
| 87 | + # run the java tests, also in Debug to test with assertions |
| 88 | + java: |
| 89 | + runs-on: ubuntu-24.04 |
| 90 | + if: always() |
| 91 | + continue-on-error: false |
| 92 | + strategy: |
| 93 | + fail-fast: false |
| 94 | + matrix: |
| 95 | + include: |
| 96 | + - bt: Debug |
| 97 | + - bt: Release |
| 98 | + steps: |
| 99 | + - name: checkout (action) |
| 100 | + uses: actions/checkout@v4 |
| 101 | + with: {submodules: recursive, fetch-depth: 0} # use fetch-depth to ensure all tags are fetched |
| 102 | + - name: build lib |
| 103 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml build |
| 104 | + - name: build jar |
| 105 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml jar |
| 106 | + - name: run java tests |
| 107 | + run: RAPIDYAML_BUILD_TYPE=${{matrix.bt}} make -C rapidyaml test |
0 commit comments