Expand self-hosted Mac M1 CI build workflow
See https://github.com/wxWidgets/wxWidgets/pull/2336
This commit is contained in:
parent
6d00ab47db
commit
b3b24e962e
182
.github/workflows/MacS-M1-make.yml
vendored
182
.github/workflows/MacS-M1-make.yml
vendored
@ -2,39 +2,181 @@ name: Mac make CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# push:
|
||||
# branches: [ master ]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'build/tools/appveyor*.bat'
|
||||
- 'build/tools/travis-ci.sh'
|
||||
- 'distrib/**'
|
||||
- 'docs/**'
|
||||
- 'interface/**'
|
||||
- 'include/msvc/**'
|
||||
- 'include/wx/dfb/**'
|
||||
- 'include/wx/gtk/**'
|
||||
- 'include/wx/gtk1/**'
|
||||
- 'include/wx/motif/**'
|
||||
- 'include/wx/msw/**'
|
||||
- 'include/wx/x11/**'
|
||||
- 'locale/**'
|
||||
- 'src/dfb/**'
|
||||
- 'src/gtk/**'
|
||||
- 'src/gtk1/**'
|
||||
- 'src/motif/**'
|
||||
- 'src/msw/**'
|
||||
- 'src/x11/**'
|
||||
- '*.md'
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- 'build/tools/appveyor*.bat'
|
||||
- 'build/tools/travis-ci.sh'
|
||||
- 'distrib/**'
|
||||
- 'docs/**'
|
||||
- 'interface/**'
|
||||
- 'include/msvc/**'
|
||||
- 'include/wx/dfb/**'
|
||||
- 'include/wx/gtk/**'
|
||||
- 'include/wx/gtk1/**'
|
||||
- 'include/wx/motif/**'
|
||||
- 'include/wx/msw/**'
|
||||
- 'include/wx/x11/**'
|
||||
- 'locale/**'
|
||||
- 'src/dfb/**'
|
||||
- 'src/gtk/**'
|
||||
- 'src/gtk1/**'
|
||||
- 'src/motif/**'
|
||||
- 'src/msw/**'
|
||||
- 'src/x11/**'
|
||||
- '*.md'
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
defaults:
|
||||
run:
|
||||
shell: /usr/bin/arch -arch ${{ matrix.arch }} /bin/bash -l {0}
|
||||
|
||||
|
||||
runs-on: self-hosted
|
||||
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||
NSUnbufferedIO: YES
|
||||
|
||||
name: ${{ matrix.build }}, arch ${{ matrix.arch }}, cxx${{ matrix.cxx }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [arm64e, x86_64]
|
||||
build: [debug, release]
|
||||
cxx: [11, 17]
|
||||
include:
|
||||
- build: debug
|
||||
configure_flags: --without-liblzma --enable-debug --disable-sys-libs --with-osx_cocoa
|
||||
- build: release
|
||||
configure_flags: --without-liblzma --disable-sys-libs --with-osx_cocoa
|
||||
- cxx: 17
|
||||
cxxconfig: --with-macosx-version-min=10.12
|
||||
- cxx: 11
|
||||
cxxconfig:
|
||||
|
||||
env:
|
||||
wxCONFIGURE_FLAGS: ${{ matrix.configure_flags }} ${{ matrix.cxxconfig }} --with-cxx=${{ matrix.cxx }} --prefix=${{ github.workspace }}/localbin_${{ matrix.arch }}
|
||||
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
|
||||
NSUnbufferedIO: YES
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: configure
|
||||
run: mkdir -p $PWD/localbin_${{ matrix.arch }}; ./configure --prefix=$PWD/localbin_${{ matrix.arch }}
|
||||
- name: make
|
||||
run: make -j4
|
||||
- name: make install
|
||||
run: make install
|
||||
- name: make tests
|
||||
run: make -j4 -C tests
|
||||
- name: run tests
|
||||
run: pushd tests;./test;popd
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo TZ=UTC >> $GITHUB_ENV
|
||||
echo LD_LIBRARY_PATH=`pwd`/lib >> $GITHUB_ENV
|
||||
wxPROC_COUNT=`sysctl -n hw.logicalcpu`
|
||||
((wxPROC_COUNT++))
|
||||
echo wxPROC_COUNT=$wxPROC_COUNT >> $GITHUB_ENV
|
||||
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $GITHUB_ENV
|
||||
# Setting this variable suppresses "Error retrieving accessibility bus address"
|
||||
# messages from WebKit tests that we're not interested in.
|
||||
echo NO_AT_BRIDGE=1 >> $GITHUB_ENV
|
||||
case "${{ matrix.compiler }}" in
|
||||
clang)
|
||||
echo CC=clang >> $GITHUB_ENV
|
||||
echo CXX='clang++ -stdlib=libc++' >> $GITHUB_ENV
|
||||
echo LD=clang++ >> $GITHUB_ENV
|
||||
allow_warn_opt="-Wno-error=#warnings"
|
||||
;;
|
||||
'')
|
||||
# Assume gcc.
|
||||
allow_warn_opt="-Wno-error=cpp"
|
||||
;;
|
||||
*)
|
||||
echo "*** Unknown compiler: ${{ matrix.compiler }} ***"
|
||||
;;
|
||||
esac
|
||||
if [ -z ${{ matrix.allow_warnings }} ]; then
|
||||
error_opts="-Werror $allow_warn_opt"
|
||||
echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV
|
||||
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
|
||||
|
||||
- name: Before install
|
||||
run: |
|
||||
./build/tools/before_install.sh
|
||||
mkdir -p $PWD/localbin_${{ matrix.arch }}
|
||||
|
||||
- name: Configuring
|
||||
run: |
|
||||
wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS"
|
||||
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
|
||||
if [ -n "$rc" ]; then
|
||||
echo '*** Configuring failed, contents of config.log follows: ***'
|
||||
echo '-----------------------------------------------------------'
|
||||
cat config.log
|
||||
echo '-----------------------------------------------------------'
|
||||
exit $rc
|
||||
fi
|
||||
|
||||
- name: Building
|
||||
run: |
|
||||
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS"
|
||||
|
||||
- name: Building tests
|
||||
run: |
|
||||
if [ !${{ matrix.skip_gui }} ]; then
|
||||
make -C tests $wxBUILD_ARGS failtest
|
||||
fi
|
||||
make -k -C tests $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|
||||
|
||||
- name: Testing
|
||||
if: matrix.skip_testing != true
|
||||
working-directory: tests
|
||||
run: |
|
||||
. ../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
|
||||
/bin/bash -o pipefail -c './test 2>&1 | tee test.out' || rc=$?
|
||||
if [ -n "$rc" ]; then
|
||||
httpbin_show_log
|
||||
exit $rc
|
||||
fi
|
||||
|
||||
- name: Building samples
|
||||
if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.skip_samples != true
|
||||
run: |
|
||||
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples
|
||||
|
||||
- name: Installing
|
||||
if: matrix.skip_testing != true
|
||||
run: |
|
||||
make install
|
||||
|
||||
- name: Testing installation
|
||||
if: matrix.skip_testing != true
|
||||
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"
|
||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -6,6 +6,7 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.github/workflows/MacS-M1-make.yml'
|
||||
- '.github/workflows/ci_cmake.yml'
|
||||
- '.github/workflows/ci_msw_cross.yml'
|
||||
- 'build/tools/appveyor*.bat'
|
||||
@ -23,6 +24,7 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '.github/workflows/MacS-M1-make.yml'
|
||||
- '.github/workflows/ci_cmake.yml'
|
||||
- '.github/workflows/ci_msw_cross.yml'
|
||||
- 'build/tools/appveyor*.bat'
|
||||
|
Loading…
Reference in New Issue
Block a user