2021-06-16 06:03:13 +08:00
|
|
|
|
2021-06-16 06:06:02 +08:00
|
|
|
name: CI
|
2021-06-16 06:03:13 +08:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
## Check for trailing white space, line width, tabs, etc.
|
|
|
|
style-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-05-01 15:56:27 +08:00
|
|
|
- name: Run static checks.
|
2021-06-16 06:03:13 +08:00
|
|
|
run: |
|
2022-05-01 15:56:27 +08:00
|
|
|
python3 scripts/static_check.py
|
2021-06-16 06:03:13 +08:00
|
|
|
|
2021-06-18 12:42:57 +08:00
|
|
|
## Compile and run test on linux.
|
2021-06-16 06:03:13 +08:00
|
|
|
linux-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run the Makefile.
|
|
|
|
run: |
|
2021-06-17 15:47:33 +08:00
|
|
|
make all
|
2021-06-16 06:03:13 +08:00
|
|
|
- name: Run tests.
|
|
|
|
run: |
|
2022-05-01 15:56:27 +08:00
|
|
|
python3 scripts/run_tests.py
|
2021-06-16 06:03:13 +08:00
|
|
|
|
2021-06-18 12:42:57 +08:00
|
|
|
## Compile and run tests on windows.
|
2021-06-16 06:03:13 +08:00
|
|
|
windows-build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run build batch script.
|
|
|
|
run: |
|
2022-05-01 15:56:27 +08:00
|
|
|
cmd /c scripts\build.bat
|
2021-06-16 06:03:13 +08:00
|
|
|
- name: Run tests.
|
|
|
|
run: |
|
2022-05-01 15:56:27 +08:00
|
|
|
python3 scripts/run_tests.py
|
2021-06-16 06:03:13 +08:00
|
|
|
|
2021-06-18 12:42:57 +08:00
|
|
|
## Compile and run tests on macos.
|
2021-06-16 06:03:13 +08:00
|
|
|
macos-build:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run the Makefile.
|
|
|
|
run: |
|
2021-06-17 15:47:33 +08:00
|
|
|
make all
|
2021-06-16 06:03:13 +08:00
|
|
|
- name: Run tests.
|
|
|
|
run: |
|
2022-05-01 15:56:27 +08:00
|
|
|
python3 scripts/run_tests.py
|
2021-06-16 06:03:13 +08:00
|
|
|
|
|
|
|
|