Skip to content

Commit

Permalink
github CI : add testing on push
Browse files Browse the repository at this point in the history
  • Loading branch information
AdelKS committed Apr 22, 2023
1 parent ff9f019 commit 24de28e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/build-run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test ZeCalculator
on:
push:
workflow_dispatch:

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout ZeCalculator
uses: actions/checkout@v3

- name: Install meson and ninja
run: pip install meson ninja

# Need clang 16 to work with libstdc++ std::ranges
- name: Setup meson build folder
run: meson setup build -D test=true
env:
CC: "gcc"
CXX: "g++"

- name: Compile code (GCC)
run: cd build && meson compile

- name: Test code (GCC)
run: cd build && meson test
16 changes: 15 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"request": "launch",
"program": "${workspaceRoot}/build-zc-debug/test/parser_test",
"preLaunchTask": "${defaultBuildTask}",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
},
{
"name": "syntax_tree_test",
Expand All @@ -19,6 +26,13 @@
"request": "launch",
"program": "${workspaceRoot}/build-zc-debug/test/syntax_tree_test",
"preLaunchTask": "${defaultBuildTask}",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
],
}
}

0 comments on commit 24de28e

Please sign in to comment.