Skip to content

Commit

Permalink
ci: updating testing script to differentiate the module folders
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFola committed May 7, 2024
1 parent 96c8fcc commit c8e364b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ White='\033[0;37m'

total_time=0

for t in lib/modules/{src,draft}/*/tests/; do
for t in lib/modules/${1:-src}/*/tests/; do
start=$(date +%s%N | tr -d 'N')

echo -n "Running ${t}..."
Expand Down
78 changes: 41 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: "CMake"

on:
push:
branches: [master]
branches: [ master ]
paths-ignore:
- '.github/*.*'
- '*.md'
- 'LICENCE'
- '.gitignore'
pull_request:
branches: [master]
branches: [ master ]

env:
BUILD_TYPE: Release
Expand All @@ -20,38 +20,42 @@ jobs:
name: "Ubuntu Clang 11"

steps:
- uses: actions/checkout@v2
if: contains(github.event.head_commit.message, '[skip ci]') == false
with:
repository: ArkScript-lang/Ark
path: '.'
submodules: recursive

- shell: bash
run: rm -r lib/modules

- uses: actions/checkout@v2
with:
submodules: recursive
path: lib/modules

- name: Update LLVM compilers
shell: bash
run: sudo apt-get install -y clang-11 lld-11 libc++-11-dev libc++abi-11-dev clang-tools-11

- name: Configure CMake Ark
shell: bash
run: |
cmake -Bbuild \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_C_COMPILER=clang-11 \
-DCMAKE_CXX_COMPILER=clang++-11 \
-DARK_BUILD_EXE=On -DARK_BUILD_MODULES=On -DARK_MOD_ALL=On
- name: Build ArkScript
shell: bash
run: cmake --build build --config $BUILD_TYPE

- name: Run module tests
shell: bash
run: source lib/modules/.github/run-tests
- uses: actions/checkout@v2
if: contains(github.event.head_commit.message, '[skip ci]') == false
with:
repository: ArkScript-lang/Ark
path: '.'
submodules: recursive

- shell: bash
run: rm -r lib/modules

- uses: actions/checkout@v2
with:
submodules: recursive
path: lib/modules

- name: Update LLVM compilers
shell: bash
run: sudo apt-get install -y clang-11 lld-11 libc++-11-dev libc++abi-11-dev clang-tools-11

- name: Configure CMake Ark
shell: bash
run: |
cmake -Bbuild \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_C_COMPILER=clang-11 \
-DCMAKE_CXX_COMPILER=clang++-11 \
-DARK_BUILD_EXE=On -DARK_BUILD_MODULES=On -DARK_MOD_ALL=On -DARK_MOD_DRAFT=On
- name: Build ArkScript
shell: bash
run: cmake --build build --config $BUILD_TYPE

- name: Run src module tests
shell: bash
run: ./lib/modules/.github/run-tests src

- name: Run draft module tests
shell: bash
run: ./lib/modules/.github/run-tests draft

0 comments on commit c8e364b

Please sign in to comment.