update #247
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: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install GCC | |
run: sudo apt-get update && sudo apt-get install -y build-essential | |
- name: Install Flex | |
run: sudo apt-get install -y flex | |
- name: Install Bison | |
run: sudo apt-get install -y bison | |
- name: Install CMake | |
run: sudo apt-get install -y cmake | |
- name: Build executable | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --target PASCC -j 6 | |
- name: Install and set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install pytest | |
run: pip install pytest | |
- name: Run tests | |
run: | | |
cd scripts | |
pytest | |