formatting #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub actions | |
on: | |
push: | |
branches: [ "**" ] | |
pull_request: | |
branches: [ "**" ] | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build antlr4_shared | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
cmake --build build --target antlr4_shared --parallel 4 | |
- name: Build parser | |
run: | | |
cmake --build build --parallel 4 | |
- name: Build unit tests POSIX | |
if: matrix.os != 'windows-latest' | |
run: | | |
cmake --build build --target unit_tests --parallel 4 | |
- name: Run parser POSIX | |
if: matrix.os != 'windows-latest' | |
run: | | |
./build/parser | |
- name: Run unit tests POSIX | |
if: matrix.os != 'windows-latest' | |
run: | | |
ctest --test-dir build | |
- name: Build unit tests Windows | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: | | |
set PATH=%PATH%;${{github.workspace}}\dist\${{env.BUILD_TYPE}} | |
cmake --build build --target unit_tests --parallel 4 | |
- name: Run parser Windows | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: | | |
set PATH=%PATH%;${{github.workspace}}\dist\${{env.BUILD_TYPE}} | |
.\build\${{env.BUILD_TYPE}}\parser.exe | |
- name: Run unit tests Windows | |
if: matrix.os == 'windows-latest' | |
shell: cmd | |
run: | | |
set PATH=%PATH%;${{github.workspace}}\dist\${{env.BUILD_TYPE}} | |
ctest --test-dir build |