From 5dcbec0fad990e5d47030d76792c9525f9820818 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 16 Jun 2024 20:45:30 +0900 Subject: [PATCH] ci: add toml-test workflow --- .github/workflows/toml-test.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/toml-test.yml diff --git a/.github/workflows/toml-test.yml b/.github/workflows/toml-test.yml new file mode 100644 index 0000000..df1fb76 --- /dev/null +++ b/.github/workflows/toml-test.yml @@ -0,0 +1,34 @@ +name: build + +on: [push, pull_request] + +jobs: + toml-test: + runs-on: Ubuntu-22.04 + strategy: + matrix: + compiler: ['g++-12'] + standard: ['11', '14', '17', '20'] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Install + run: | + sudo apt update + sudo apt install -y ${{ matrix.compiler }} golang-go + - name: Configure + run: | + cmake -B build/ -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_BUILD_TOML_TESTS=ON + - name: Build + run: | + cmake --build build/ + - name: Test + run: | + go install github.com/toml-lang/toml-test/cmd/toml-test@latest + toml-test ./build/tests/toml11_decoder + # skipped tests does not conform the latest commit in toml-lang/toml + toml-test -toml 1.1.0 ./tests/toml11_decoder_v1_1_0 -skip invalid/control/comment-del,invalid/control/comment-lf,invalid/control/comment-us + toml-test ./build/tests/toml11_encoder +