Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

CI: update macOS images and various fixes #3639

Merged
merged 22 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,44 @@ mac_task:

- name: 🍎 Clang
osx_instance:
image: catalina-xcode
image: big-sur-xcode
env:
ENABLE_LOGGER: ON
TOOLS: ALL;web
PLUGINS: ALL;-curlget # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
PLUGINS: ALL;-curlget;-augeas
# The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
# The augeas tests fail: https://github.com/ElektraInitiative/libelektra/issues/3743

- name: 🍎 Clang ASAN
osx_instance:
image: catalina-xcode
image: big-sur-xcode
env:
ASAN_OPTIONS: 'detect_leaks=1'
BINDINGS: cpp
ENABLE_ASAN: ON
TOOLS: kdb
PLUGINS: ALL;-curlget # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
DBUS_BUG: ON # dbus tests on cirrus are failing: https://github.com/ElektraInitiative/libelektra/issues/3635
PLUGINS: ALL;-curlget;-augeas
# The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
# The augeas tests fail: https://github.com/ElektraInitiative/libelektra/issues/3743

- name: 🍎 FULL
osx_instance:
image: catalina-xcode
image: big-sur-xcode
env:
BUILD_FULL: ON
BUILD_SHARED: OFF
PLUGINS: ALL;-curlget # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382

- name: 🍎 MMap
osx_instance:
image: catalina-xcode
image: big-sur-xcode
env:
KDB_DEFAULT_STORAGE: mmapstorage
KDB_DB_FILE: default.mmap
KDB_DB_INIT: elektra.mmap
PLUGINS: ALL;-curlget # The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
PLUGINS: ALL;-curlget;-augeas
# The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
# The augeas tests fail: https://github.com/ElektraInitiative/libelektra/issues/3743

install_script:
- | # Install Homebrew formulas
Expand All @@ -132,6 +137,7 @@ mac_task:
brew install boost
brew install clang-format
brew install dbus
brew upgrade dbus
brew install discount
brew install doxygen
brew install flex
Expand Down Expand Up @@ -165,7 +171,12 @@ mac_task:
- | # Start D-Bus session bus
brew tap homebrew/services
brew update # Work around for [Homebrew Services issue 206](https://github.com/Homebrew/homebrew-services/issues/206)
brew services start dbus
brew postinstall dbus
brew services restart dbus # Workaround for dbus socket issues on cirrus
export DBUS_LAUNCHD_SESSION_BUS_SOCKET=$(find /private/tmp/com.apple.launchd*/unix_domain_listener | xargs ls -Art | tail -n1) # workaround for cirrus
launchctl setenv DBUS_LAUNCHD_SESSION_BUS_SOCKET $DBUS_LAUNCHD_SESSION_BUS_SOCKET
echo $DBUS_LAUNCHD_SESSION_BUS_SOCKET
launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET
- | # Install Python
brew install python@3.8 || brew upgrade python@3.8
export PATH="/usr/local/opt/python@3.8/bin:$PATH"
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/macOS_gcc10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ env:
BUILD_TYPE: RelWithDebInfo
# Unfortunately the tests for the Xerces plugin fail: https://travis-ci.org/ElektraInitiative/libelektra/jobs/483331657#L3740
# The curlget tests fail: https://github.com/ElektraInitiative/libelektra/issues/3382
PLUGINS: 'ALL;-xerces;-curlget'
# The tests fail with jni: https://github.com/ElektraInitiative/libelektra/issues/3747
PLUGINS: 'ALL;-xerces;-curlget;-jni'
markus2330 marked this conversation as resolved.
Show resolved Hide resolved
BINDINGS: 'ALL;-rust'
# Skip homebrew cleanup to avoid issues with removal of packages
HOMEBREW_NO_INSTALL_CLEANUP: 1
Expand All @@ -21,10 +22,17 @@ jobs:
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: macos-latest
runs-on: macos-10.15

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7 # Not needed with a .ruby-version file

- name: Install Dependencies
run: |
Expand All @@ -42,17 +50,22 @@ jobs:
brew install libuv
brew install lua
brew install ninja
brew install openjdk
brew install qt
brew install swig
brew install yajl
brew install zeromq

- name: Setup Build Environment
run: |
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
echo "JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home" >> $GITHUB_ENV
echo "/usr/local/opt/openjdk/bin" >> $GITHUB_PATH
gem install test-unit --no-document
pip2 install cheetah # Required by kdb-gen
brew tap homebrew/services
brew update # Work around for [Homebrew Services issue 206](https://github.com/Homebrew/homebrew-services/issues/206)
brew postinstall dbus
brew services restart dbus
cmake -E make_directory ${{runner.workspace}}/build

Expand All @@ -65,8 +78,6 @@ jobs:
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: |
PATH="/usr/local/opt/ruby@2.7/bin:/usr/local/lib/ruby/gems/2.7.0/bin:$PATH"
PATH="/usr/local/opt/python@3.9/bin:$PATH"
SYSTEM_DIR="$PWD/kdbsystem"
CMAKE_OPT+=(
-GNinja
Expand All @@ -83,7 +94,6 @@ jobs:
-DKDB_DEFAULT_STORAGE="${KDB_DEFAULT_STORAGE:-dump}"
-DKDB_DB_FILE="${KDB_DB_FILE:-default.ecf}"
-DKDB_DB_INIT="${KDB_DB_INIT:-elektra.ecf}"
$TRAVIS_BUILD_DIR
)
printf '—— CMake Config ——\n'
for option in "${CMAKE_OPT[@]}"; do printf '%s\n' "$option"; done
Expand Down
5 changes: 4 additions & 1 deletion doc/news/_preparation_next_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,14 @@ _(@tucek)_

- Update FreeBSD images from version 12.1 to 12.2 _(Robert Sowula)_
- <<TODO>>
- Update brew before installing packages and print brew config. _(Mihael Pranjić)_
- Restart `dbus` service before running tests and find `DBUS_LAUNCHD_SESSION_BUS_SOCKET` manually (as workaround). _(Mihael Pranjić)_
- Use macOS Big Sur images. _(Mihael Pranjić)_
- <<TODO>>

### GitHub Actions

- <<TODO>>
- Fix issues with `dbus` and java paths, exclude `jni`. _(Mihael Pranjić)_
- <<TODO>>
- <<TODO>>

Expand Down
7 changes: 1 addition & 6 deletions scripts/dev/run_nocheckshell.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@ if [ $# -ne 1 ]; then
exit 1
fi

if [ "$DBUS_BUG" = 'ON' ]; then
ARGS="-j@PROCESSOR_COUNT@ --force-new-ctest-process --output-on-failure -E test(scr_check|mod_dbus) --build-config $1"
else
ARGS="-j@PROCESSOR_COUNT@ --force-new-ctest-process --output-on-failure -E testscr_check --build-config $1"
fi

ARGS="-j@PROCESSOR_COUNT@ --force-new-ctest-process --output-on-failure -E testscr_check --build-config $1"
ctest $ARGS || ctest $ARGS --rerun-failed