making sure CI builds don’t contaminated checked out directory on self-hosted runner

self-hosted runners are stateful - surprise - so we have to isolate things better
This commit is contained in:
Stefan Csomor 2022-04-17 20:47:54 +02:00
parent b66d4488e1
commit 88bd6d0135

View file

@ -152,6 +152,8 @@ jobs:
run: |
./build/tools/before_install.sh
mkdir -p $PWD/localbin_${{ matrix.arch }}
rm -r $PWD/builddir
mkdir -p $PWD/builddir
- name: Show build environment
run: |
@ -164,6 +166,7 @@ jobs:
echo
- name: Configuring
working-directory: builddir
run: |
wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS"
@ -172,15 +175,14 @@ jobs:
wxCONFIGURE_OPTIONS="--with-macosx-sdk=$sdk_path $wxCONFIGURE_OPTIONS"
fi
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
if [ ${{ matrix.use_asan }} ]; then
wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
wxASAN_CXXFLAGS=$wxASAN_CFLAGS
wxASAN_LDFLAGS="-fsanitize=address"
./configure $wxCONFIGURE_OPTIONS --enable-debug "CFLAGS=$wxASAN_CFLAGS" "CXXFLAGS=$wxASAN_CXXFLAGS" "LDFLAGS=$wxASAN_LDFLAGS" || rc=$?
../configure $wxCONFIGURE_OPTIONS --enable-debug "CFLAGS=$wxASAN_CFLAGS" "CXXFLAGS=$wxASAN_CXXFLAGS" "LDFLAGS=$wxASAN_LDFLAGS" || rc=$?
else
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
../configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
fi
if [ -n "$rc" ]; then
echo '*** Configuring failed, contents of config.log follows: ***'
@ -191,19 +193,21 @@ jobs:
fi
- name: Building
working-directory: builddir
run: |
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS"
- name: Building tests
working-directory: builddir
run: |
make -C tests $wxBUILD_ARGS failtest
make -k -C tests $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
- name: Testing
if: matrix.skip_testing != true
working-directory: tests
working-directory: builddir/tests
run: |
. ../build/tools/httpbin.sh
. ../../build/tools/httpbin.sh
httpbin_launch
export ASAN_OPTIONS=fast_unwind_on_malloc=0
# Explicitly use bash because /bin/sh doesn't have pipefail option
@ -215,7 +219,7 @@ jobs:
- name: Testing GUI
if: matrix.skip_testing != true
working-directory: tests
working-directory: builddir/tests
run: |
# We currently need to disable container overflow detection as we get
# what seems to be a false positive in BitmapComboBoxTestCase triggered
@ -228,16 +232,19 @@ jobs:
- name: Building samples
if: matrix.skip_testing != true && matrix.skip_samples != true
working-directory: builddir
run: |
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples
- name: Installing
if: matrix.skip_testing != true
working-directory: builddir
run: |
make install
- name: Testing installation
if: matrix.skip_testing != true
working-directory: builddir
run: |
make -C samples/minimal -f makefile.unx clean
make -C samples/minimal -f makefile.unx WX_CONFIG=${{ github.workspace }}/localbin_${{ matrix.arch }}/bin/wx-config $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
make -C ../samples/minimal -f makefile.unx clean
make -C ../samples/minimal -f makefile.unx WX_CONFIG=${{ github.workspace }}/localbin_${{ matrix.arch }}/bin/wx-config $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"