2021-12-13 23:36:50 +08:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
2022-02-24 07:35:03 +08:00
|
|
|
# Cancel old PR builds when pushing new commits.
|
|
|
|
concurrency:
|
|
|
|
group: build-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-12-13 23:36:50 +08:00
|
|
|
jobs:
|
2022-02-14 18:26:59 +08:00
|
|
|
common:
|
|
|
|
uses: TokTok/ci-tools/.github/workflows/common-ci.yml@master
|
|
|
|
|
2023-12-27 06:02:58 +08:00
|
|
|
cppcheck:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Docker Build
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
file: other/docker/cppcheck/Dockerfile
|
|
|
|
|
2022-01-14 21:03:32 +08:00
|
|
|
mypy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-01-14 21:03:32 +08:00
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- name: Install mypy
|
|
|
|
run: pip install mypy
|
|
|
|
- name: Run mypy
|
|
|
|
run: |
|
2022-02-04 23:05:19 +08:00
|
|
|
(find . -name "*.py" -and -not -name "conanfile.py"; grep -lR '^#!.*python') \
|
|
|
|
| xargs -n1 -P8 mypy --strict
|
2022-01-14 21:03:32 +08:00
|
|
|
|
2023-12-27 03:39:22 +08:00
|
|
|
clang-tidy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Docker Build
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
file: other/docker/clang-tidy/Dockerfile
|
|
|
|
|
2022-03-05 08:57:20 +08:00
|
|
|
doxygen:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-03-05 08:57:20 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2022-03-05 08:57:20 +08:00
|
|
|
with:
|
|
|
|
file: other/docker/doxygen/Dockerfile
|
|
|
|
|
2022-02-18 04:22:12 +08:00
|
|
|
tokstyle:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-02-18 04:22:12 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2022-02-18 04:22:12 +08:00
|
|
|
with:
|
|
|
|
file: other/docker/tokstyle/Dockerfile
|
|
|
|
|
2022-04-04 06:30:48 +08:00
|
|
|
misra:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-04-04 06:30:48 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2022-04-04 06:30:48 +08:00
|
|
|
with:
|
|
|
|
file: other/docker/misra/Dockerfile
|
|
|
|
|
2023-12-25 08:28:36 +08:00
|
|
|
build-autotools:
|
2022-03-05 08:57:20 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-18 13:46:19 +08:00
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-11-18 13:46:19 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
2023-11-18 13:46:19 +08:00
|
|
|
file: other/docker/autotools/Dockerfile
|
2022-03-05 08:57:20 +08:00
|
|
|
|
2023-11-18 13:46:19 +08:00
|
|
|
build-tcc:
|
2021-12-13 23:36:50 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-12-14 23:35:37 +08:00
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-12-14 23:35:37 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2021-12-14 23:35:37 +08:00
|
|
|
with:
|
2023-11-18 13:46:19 +08:00
|
|
|
file: other/docker/tcc/Dockerfile
|
|
|
|
|
|
|
|
build-compcert:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-11-18 13:46:19 +08:00
|
|
|
- name: Docker Build
|
2023-12-20 03:54:51 +08:00
|
|
|
uses: docker/build-push-action@v4
|
2023-11-18 13:46:19 +08:00
|
|
|
with:
|
|
|
|
file: other/docker/compcert/Dockerfile
|
|
|
|
|
|
|
|
cimplefmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-18 13:46:19 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Run cimplefmt
|
|
|
|
run: other/docker/cimplefmt/run -u $(find tox* -name "*.[ch]")
|
2021-12-20 09:39:24 +08:00
|
|
|
|
|
|
|
build-win32:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-12-20 09:39:24 +08:00
|
|
|
- name: Cross compilation
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win32 script
|
2021-12-20 09:39:24 +08:00
|
|
|
|
|
|
|
build-win64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-12-20 09:39:24 +08:00
|
|
|
- name: Cross compilation
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-win64 script
|
2021-12-21 00:57:11 +08:00
|
|
|
|
2021-12-29 07:25:34 +08:00
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-12-29 07:25:34 +08:00
|
|
|
- name: Build and test
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/cmake-osx
|
2021-12-31 04:58:35 +08:00
|
|
|
|
2022-01-06 03:43:44 +08:00
|
|
|
coverage-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-02-25 00:42:04 +08:00
|
|
|
- name: Build, test, and upload coverage
|
2023-12-21 07:41:22 +08:00
|
|
|
run: other/docker/coverage/run
|
2022-01-06 03:43:44 +08:00
|
|
|
|
2022-02-11 06:30:44 +08:00
|
|
|
build-android:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-12-20 03:54:51 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-03-25 02:16:45 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-02-11 06:30:44 +08:00
|
|
|
- run: .github/scripts/cmake-android armeabi-v7a
|
|
|
|
- run: .github/scripts/cmake-android arm64-v8a
|
|
|
|
- run: .github/scripts/cmake-android x86
|
|
|
|
- run: .github/scripts/cmake-android x86_64
|