Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build steps for Build On Linux #22135

Merged
merged 8 commits into from
Aug 26, 2022
36 changes: 14 additions & 22 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
retention-days: 5
build_linux:
name: Build on Linux (fake, gcc_release, clang, simulated)
timeout-minutes: 120
timeout-minutes: 150

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -185,31 +185,14 @@ jobs:
- name: Setup Build, Run Build and Run Tests
timeout-minutes: 90
run: |
for BUILD_TYPE in gcc_release clang; do
case $BUILD_TYPE in
"gcc_release") GN_ARGS='is_debug=false';;
"clang") GN_ARGS='is_clang=true';;
esac

BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
done
- name: Clang-tidy validation
timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/clang/compile_commands.json \
check \
"
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false"
scripts/run_in_build_env.sh "ninja -C ./out/gcc_release"
BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh
- name: Run Tests with sanitizers
timeout-minutes: 60
env:
LSAN_OPTIONS: detect_leaks=1
run: |
# for BUILD_TYPE in asan msan tsan ubsan; do
for BUILD_TYPE in asan tsan ubsan; do
case $BUILD_TYPE in
"asan") GN_ARGS='is_clang=true is_asan=true';;
Expand All @@ -218,9 +201,18 @@ jobs:
"ubsan") GN_ARGS='is_clang=true is_ubsan=true';;
esac

scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
scripts/tests/gn_tests.sh
done
- name: Clang-tidy validation
timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/ubsan/compile_commands.json \
check \
"
- name: Build using build_examples.py
timeout-minutes: 60
run: |
Expand Down