2020-11-24 08:12:39 +00:00
|
|
|
name: Code Checker
|
|
|
|
# TODO: do not trigger action for some document file update
|
|
|
|
|
|
|
|
# This workflow is triggered on pushes or pull request to the repository.
|
|
|
|
on:
|
2022-02-21 12:11:51 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-11-24 08:12:39 +00:00
|
|
|
pull_request:
|
|
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
|
|
paths:
|
|
|
|
- 'scripts/**'
|
|
|
|
- 'internal/**'
|
2023-04-11 02:32:31 +00:00
|
|
|
- 'pkg/**'
|
2020-11-24 08:12:39 +00:00
|
|
|
- 'cmd/**'
|
|
|
|
- 'build/**'
|
2023-05-23 13:09:28 +00:00
|
|
|
- 'tests/integration/**'
|
2020-11-24 08:12:39 +00:00
|
|
|
- '.github/workflows/code-checker.yaml'
|
|
|
|
- '.env'
|
|
|
|
- docker-compose.yml
|
|
|
|
- Makefile
|
|
|
|
- '!**.md'
|
2021-05-14 10:23:30 +00:00
|
|
|
- '!build/ci/jenkins/**'
|
2021-09-29 15:28:55 +00:00
|
|
|
# FIXME(wxyu): not need to run code check, update the ci-passed rules and remove these two lines
|
|
|
|
- go.mod
|
|
|
|
- go.sum
|
2023-03-10 05:35:52 +00:00
|
|
|
- .golangci.yml
|
|
|
|
- rules.go
|
2020-11-24 08:12:39 +00:00
|
|
|
|
2023-12-14 03:30:38 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
2024-01-09 10:28:48 +00:00
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
2023-12-14 03:30:38 +00:00
|
|
|
|
2020-11-24 08:12:39 +00:00
|
|
|
jobs:
|
|
|
|
ubuntu:
|
2023-08-18 10:32:19 +00:00
|
|
|
name: Code Checker AMD64 Ubuntu 20.04
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-13 07:34:33 +00:00
|
|
|
timeout-minutes: 180
|
2020-11-24 08:12:39 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2023-11-01 01:00:14 +00:00
|
|
|
- name: Maximize build space
|
|
|
|
uses: easimon/maximize-build-space@master
|
2023-12-14 09:44:39 +00:00
|
|
|
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
|
2023-11-01 01:00:14 +00:00
|
|
|
with:
|
2023-12-08 08:14:07 +00:00
|
|
|
root-reserve-mb: 20480
|
2023-11-01 01:00:14 +00:00
|
|
|
swap-size-mb: 1024
|
|
|
|
remove-dotnet: 'true'
|
|
|
|
remove-android: 'true'
|
|
|
|
remove-haskell: 'true'
|
2020-11-24 08:12:39 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-12-27 03:56:57 +00:00
|
|
|
- name: Download Caches
|
|
|
|
uses: ./.github/actions/cache
|
2020-12-09 12:07:27 +00:00
|
|
|
with:
|
2023-12-27 03:56:57 +00:00
|
|
|
os: 'ubuntu20.04'
|
2020-11-24 08:12:39 +00:00
|
|
|
- name: Code Check
|
2020-12-09 12:07:27 +00:00
|
|
|
env:
|
2022-11-23 02:39:11 +00:00
|
|
|
OS_NAME: 'ubuntu20.04'
|
2020-11-24 08:12:39 +00:00
|
|
|
run: |
|
2022-11-23 02:39:11 +00:00
|
|
|
./build/builder.sh /bin/bash -c "make check-proto-product && make verifiers"
|
2023-12-27 03:56:57 +00:00
|
|
|
|
2023-08-18 10:32:19 +00:00
|
|
|
amazonlinux:
|
|
|
|
name: Code Checker Amazonlinux 2023
|
|
|
|
# Run in amazonlinux docker
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-13 07:34:33 +00:00
|
|
|
timeout-minutes: 180
|
2022-03-31 06:49:28 +00:00
|
|
|
steps:
|
2023-11-01 01:00:14 +00:00
|
|
|
- name: Maximize build space
|
|
|
|
uses: easimon/maximize-build-space@master
|
2023-12-14 09:44:39 +00:00
|
|
|
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
|
2023-11-01 01:00:14 +00:00
|
|
|
with:
|
2023-12-08 08:14:07 +00:00
|
|
|
root-reserve-mb: 20480
|
2023-11-01 01:00:14 +00:00
|
|
|
swap-size-mb: 1024
|
|
|
|
remove-dotnet: 'true'
|
|
|
|
remove-android: 'true'
|
|
|
|
remove-haskell: 'true'
|
2022-03-31 06:49:28 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2023-12-27 03:56:57 +00:00
|
|
|
- name: Download Caches
|
|
|
|
uses: ./.github/actions/cache
|
2022-11-23 02:39:11 +00:00
|
|
|
with:
|
2023-12-27 03:56:57 +00:00
|
|
|
os: 'amazonlinux2023'
|
2022-03-31 06:49:28 +00:00
|
|
|
- name: Code Check
|
|
|
|
run: |
|
2023-09-07 07:43:15 +00:00
|
|
|
sed -i 's/ubuntu20.04/amazonlinux2023/g' .env
|
2022-11-23 02:39:11 +00:00
|
|
|
./build/builder.sh /bin/bash -c "make install"
|