|
@@ -20,9 +20,14 @@ on:
|
|
|
description: 'JSON container information for aks runs-on'
|
|
|
required: false
|
|
|
default: '{"image":null}'
|
|
|
+ is-asan:
|
|
|
+ description: 'Building the Address Sanitizer (ASan) Linux build'
|
|
|
+ required: false
|
|
|
+ type: boolean
|
|
|
+ default: false
|
|
|
|
|
|
concurrency:
|
|
|
- group: electron-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
|
|
+ group: electron-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref }}
|
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
|
|
|
|
|
permissions:
|
|
@@ -47,6 +52,7 @@ jobs:
|
|
|
env:
|
|
|
BUILD_TYPE: ${{ matrix.build-type }}
|
|
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
|
|
+ ARTIFACT_KEY: ${{ matrix.build-type }}_${{ inputs.target-arch }}
|
|
|
steps:
|
|
|
- name: Fix node20 on arm32 runners
|
|
|
if: ${{ inputs.target-arch == 'arm' }}
|
|
@@ -112,16 +118,22 @@ jobs:
|
|
|
touch .disable_auto_update
|
|
|
- name: Add Depot Tools to PATH
|
|
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
|
|
+ - name: Load ASan specific environment variables
|
|
|
+ if: ${{ inputs.is-asan == true }}
|
|
|
+ run: |
|
|
|
+ echo "ARTIFACT_KEY=${{ matrix.build-type }}_${{ inputs.target-arch }}_asan" >> $GITHUB_ENV
|
|
|
+ echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
|
|
|
+ echo "IS_ASAN=true" >> $GITHUB_ENV
|
|
|
- name: Download Generated Artifacts
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
|
|
with:
|
|
|
- name: generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
|
|
+ name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
|
|
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
|
|
- name: Download Src Artifacts
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
|
|
with:
|
|
|
- name: src_artifacts_${{ matrix.build-type }}_${{ env.TARGET_ARCH }}
|
|
|
- path: ./src_artifacts_${{ matrix.build-type }}_${{ env.TARGET_ARCH }}
|
|
|
+ name: src_artifacts_${{ env.ARTIFACT_KEY }}
|
|
|
+ path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
|
|
- name: Restore Generated Artifacts
|
|
|
run: ./src/electron/script/actions/restore-artifacts.sh
|
|
|
- name: Unzip Dist, Mksnapshot & Chromedriver
|
|
@@ -159,7 +171,21 @@ jobs:
|
|
|
chown -R :builduser . && chmod -R g+w .
|
|
|
chmod 4755 ../out/Default/chrome-sandbox
|
|
|
runuser -u builduser -- git config --global --add safe.directory $(pwd)
|
|
|
- runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
|
|
+ if [ "${{ inputs.is-asan }}" == "true" ]; then
|
|
|
+ cd ..
|
|
|
+ ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron"
|
|
|
+ export ASAN_OPTIONS="symbolize=0 handle_abort=1"
|
|
|
+ export G_SLICE=always-malloc
|
|
|
+ export NSS_DISABLE_ARENA_FREE_LIST=1
|
|
|
+ export NSS_DISABLE_UNLOAD=1
|
|
|
+ export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
|
|
|
+ export MOCHA_TIMEOUT=180000
|
|
|
+ echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
|
|
+ cd electron
|
|
|
+ runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files | $ASAN_SYMBOLIZE
|
|
|
+ else
|
|
|
+ runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
|
|
+ fi
|
|
|
fi
|
|
|
- name: Wait for active SSH sessions
|
|
|
if: always() && !cancelled()
|