2021-09-24 21:13:52 +03:00
|
|
|
name: toml CI
|
|
|
|
|
|
|
|
on:
|
2022-05-15 09:06:01 +03:00
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-09-24 21:13:52 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
toml-module-pass-external-test-suites:
|
2022-08-29 12:43:50 +03:00
|
|
|
runs-on: ubuntu-latest
|
2022-05-22 20:19:04 +03:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2022-01-02 19:13:43 +03:00
|
|
|
timeout-minutes: 30
|
2021-11-06 16:35:31 +03:00
|
|
|
env:
|
2021-11-26 20:15:01 +03:00
|
|
|
TOML_BS_TESTS_PATH: vlib/toml/tests/testdata/burntsushi/toml-test
|
2022-01-02 19:13:43 +03:00
|
|
|
TOML_BS_TESTS_PINNED_COMMIT: 4634fdf
|
2021-11-26 20:15:01 +03:00
|
|
|
TOML_IARNA_TESTS_PATH: vlib/toml/tests/testdata/iarna/toml-test
|
|
|
|
TOML_IARNA_TESTS_PINNED_COMMIT: 1880b1a
|
2022-01-03 11:52:34 +03:00
|
|
|
TOML_AC_TESTS_PATH: vlib/toml/tests/testdata/alexcrichton/toml-test
|
|
|
|
TOML_AC_TESTS_PINNED_COMMIT: 499e8c4
|
2022-01-02 19:13:43 +03:00
|
|
|
VTEST_TOML_DO_LARGE_FILES: 1
|
|
|
|
VTEST_TOML_DO_YAML_CONVERSION: 1
|
2021-09-24 21:13:52 +03:00
|
|
|
steps:
|
2022-05-12 23:29:37 +03:00
|
|
|
|
2021-11-06 16:35:31 +03:00
|
|
|
- uses: actions/checkout@v2
|
2021-11-17 09:30:40 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-01-03 16:03:43 +03:00
|
|
|
sudo apt-get install --quiet -y jq libgc-dev
|
2021-11-06 16:35:31 +03:00
|
|
|
- name: Build V
|
|
|
|
run: make -j2 && ./v -cc gcc -o v cmd/v
|
2021-09-24 21:13:52 +03:00
|
|
|
|
2022-01-03 11:52:34 +03:00
|
|
|
- name: Show JQ Version
|
|
|
|
run: jq --version
|
|
|
|
|
2021-11-23 17:58:12 +03:00
|
|
|
- name: Run local TOML tests
|
|
|
|
run: ./v test vlib/toml
|
|
|
|
|
2021-11-30 16:08:30 +03:00
|
|
|
# Tests found at https://github.com/BurntSushi/toml-test
|
2021-11-06 16:35:31 +03:00
|
|
|
- name: Clone BurntSushi/toml-test
|
|
|
|
run: |
|
2022-01-02 19:13:43 +03:00
|
|
|
git clone -n https://github.com/BurntSushi/toml-test.git $TOML_BS_TESTS_PATH
|
2021-11-26 20:15:01 +03:00
|
|
|
git -C $TOML_BS_TESTS_PATH checkout $TOML_BS_TESTS_PINNED_COMMIT
|
2021-09-24 21:13:52 +03:00
|
|
|
|
2021-11-23 17:58:12 +03:00
|
|
|
- name: Run BurntSushi TOML tests
|
2022-12-15 11:16:42 +03:00
|
|
|
run: ./v vlib/toml/tests/burntsushi_toml_test.v
|
2021-11-26 18:11:14 +03:00
|
|
|
|
2021-11-30 16:08:30 +03:00
|
|
|
# Tests found at gist
|
2021-11-26 18:11:14 +03:00
|
|
|
- name: Get large_toml_file_test.toml
|
|
|
|
run: wget https://gist.githubusercontent.com/Larpon/89b0e3d94c6903851ff15559e5df7a05/raw/62a1f87a4e37bf157f2e0bfb32d85d840c98e422/large_toml_file_test.toml -O vlib/toml/tests/testdata/large_toml_file_test.toml
|
|
|
|
|
|
|
|
- name: Run large TOML file tests
|
|
|
|
run: ./v vlib/toml/tests/large_toml_file_test.v
|
2021-11-26 20:15:01 +03:00
|
|
|
|
2021-11-30 16:08:30 +03:00
|
|
|
# Tests found at https://github.com/iarna/toml-spec-tests
|
2021-11-26 20:15:01 +03:00
|
|
|
- name: Clone iarna/toml-spec-tests
|
|
|
|
run: |
|
2022-01-02 19:13:43 +03:00
|
|
|
git clone -n https://github.com/iarna/toml-spec-tests.git $TOML_IARNA_TESTS_PATH
|
2021-11-26 20:15:01 +03:00
|
|
|
git -C $TOML_IARNA_TESTS_PATH checkout $TOML_IARNA_TESTS_PINNED_COMMIT
|
|
|
|
|
|
|
|
- name: Run iarna TOML tests
|
2022-12-15 11:16:42 +03:00
|
|
|
run: ./v -gc boehm vlib/toml/tests/iarna_toml_spec_test.v
|
2021-11-30 16:08:30 +03:00
|
|
|
|
|
|
|
# Tests found at https://github.com/alexcrichton/toml-rs
|
|
|
|
- name: Clone alexcrichton/toml-rs
|
|
|
|
run: |
|
2022-01-02 19:13:43 +03:00
|
|
|
git clone -n https://github.com/alexcrichton/toml-rs.git $TOML_AC_TESTS_PATH
|
2022-01-03 12:15:42 +03:00
|
|
|
git -C $TOML_AC_TESTS_PATH checkout $TOML_AC_TESTS_PINNED_COMMIT
|
2021-11-30 16:08:30 +03:00
|
|
|
|
|
|
|
- name: Run alexcrichton TOML tests
|
2022-12-15 11:16:42 +03:00
|
|
|
run: ./v vlib/toml/tests/alexcrichton_toml_rs_test.v
|