From 15f77efad6effe59f870b95ef51a85e1f60cba80 Mon Sep 17 00:00:00 2001 From: Alexandre Plateau Date: Sun, 14 Jan 2024 20:04:48 +0100 Subject: [PATCH] ci: updating the workflows to use the new target and remove the parser one --- .github/workflows/ci.yml | 19 ++++++++++++------- .github/workflows/setup-tests/action.yaml | 7 +++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f796c2f8..3ae0094fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: -DCMAKE_C_COMPILER=${{ matrix.config.cc }} \ -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \ -DARK_SANITIZERS=${{ matrix.config.sanitizers }} \ - -DARK_BUILD_EXE=On -DARK_BUILD_MODULES=On -DARK_MOD_ALL=On -DARK_BUILD_PARSER_TESTS=On + -DARK_BUILD_EXE=On -DARK_BUILD_MODULES=On -DARK_MOD_ALL=On -DARK_TESTS=On - name: Add SQLite deps if: startsWith(matrix.config.name, 'Windows') @@ -124,6 +124,7 @@ jobs: shell: bash run: cmake --build build --config $BUILD_TYPE + # TODO: remove this to put all the tests under tests/unittests - name: Configure & build CMake Integration tests shell: bash run: | @@ -141,11 +142,9 @@ jobs: mkdir -p artifact/lib/std # Linux/MacOS cp build/arkscript artifact || true - cp build/parser artifact || true cp build/libArkReactor.* artifact || true # Windows cp build/$BUILD_TYPE/arkscript.exe artifact || true - cp build/$BUILD_TYPE/parser.exe artifact || true cp build/$BUILD_TYPE/ArkReactor.dll artifact || true # Generic cp lib/*.arkm artifact/lib @@ -155,9 +154,11 @@ jobs: - name: Organize temp artifact shell: bash run: | - mkdir -p temp/parser/ + cp build/unittests artifact || true + cp build/$BUILD_TYPE/unittests.exe artifact || true + mkdir -p temp/unittests/ cp -r tests/cpp temp/ - cp -r tests/parser temp/ + cp -r tests/unittests temp/ - name: Upload artifact uses: actions/upload-artifact@v3.1.1 @@ -194,18 +195,20 @@ jobs: - name: Setup tests uses: ./.github/workflows/setup-tests - - name: Parser tests + - name: Unit tests shell: bash run: | export ASAN_OPTIONS=detect_odr_violation=0 - (cd tests/parser/tests ; bash ./run) + unittests * + # TODO: move to tests/unittests - name: Integration tests shell: bash run: | export ASAN_OPTIONS=detect_odr_violation=0 (cd tests/cpp ; bash ./run-tests) + # TODO: move to tests/unittests - name: AST tests shell: bash run: | @@ -218,12 +221,14 @@ jobs: export ASAN_OPTIONS=detect_odr_violation=0 (cd tests/arkscript ; bash ./run-tests) + # FIXME: re-enable later on #- name: Modules tests # shell: bash # run: | # export ASAN_OPTIONS=detect_odr_violation=0 # (source ./lib/modules/.github/run-tests) + # TODO: move to tests/unittests - name: Runtime error message generation tests shell: bash run: | diff --git a/.github/workflows/setup-tests/action.yaml b/.github/workflows/setup-tests/action.yaml index 525e63976..d6d78c655 100644 --- a/.github/workflows/setup-tests/action.yaml +++ b/.github/workflows/setup-tests/action.yaml @@ -31,12 +31,11 @@ runs: mv artifact/cpp/out tests/cpp/ mv build/lib/*.arkm lib/ chmod u+x build/arkscript tests/cpp/out/* - cp -r artifact/parser/* tests/parser/ - cp -r build tests/parser/ && ls tests/parser/build/ - chmod u+x tests/parser/build/parser + cp -r artifact/unittests/* tests/unittests/ + chmod u+x unittests - shell: bash if: startsWith(matrix.config.name, 'Windows') run: | cp build/*.dll tests/cpp/out/ - cp build/*.dll tests/parser/build/ + cp build/*.dll .