Skip to content

Commit

Permalink
ci: updating the workflows to use the new target and remove the parse…
Browse files Browse the repository at this point in the history
…r one
  • Loading branch information
SuperFola committed Jan 15, 2024
1 parent d8391fd commit b8c1611
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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/[email protected]
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/setup-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

0 comments on commit b8c1611

Please sign in to comment.