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

Add CI for MacOS #427

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,30 @@ jobs:
fail-fast: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are probable best viewed with "Hide whitespace", since this introduces an if which changes existing script indentation.

matrix:
otp_vsn: [23, 24, 25, master, latest]
os: [ubuntu-18.04, ubuntu-20.04]
os: [ubuntu-18.04, ubuntu-20.04, macos-11, macos-12]
steps:
- name: Update env.
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list # Reduces chance of time-outs
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y --no-install-recommends \
curl ca-certificates git autoconf dpkg-dev \
zlib1g-dev libncurses5-dev libssl-dev unixodbc-dev libgmp3-dev \
libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libsctp-dev \
lksctp-tools build-essential gcc-9 m4 fop xsltproc \
default-jdk libxml2-utils procps valgrind binutils
echo 'KERL_RELEASE_TARGET=debug opt gcov gprof valgrind lcnt' >> $GITHUB_ENV
if [[ ${{matrix.os}} == macos* ]]; then
/bin/bash -c "$(curl -fsSL \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only differences, from Ubuntu, are this section and the one below (KERL_RELEASE_TARGET). I use Homebrew to ease the installation process of required tools...

https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install automake fop wxwidgets
else
sudo sed -i 's/azure\.//' /etc/apt/sources.list # Reduces chance of time-outs
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y --no-install-recommends \
curl ca-certificates git autoconf dpkg-dev \
zlib1g-dev libncurses5-dev libssl-dev unixodbc-dev libgmp3-dev \
libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libsctp-dev \
lksctp-tools build-essential gcc-9 m4 fop xsltproc \
default-jdk libxml2-utils procps valgrind binutils
fi
if [[ ${{matrix.os}} == macos* ]]; then
echo 'KERL_RELEASE_TARGET=debug opt' >> $GITHUB_ENV
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I single this if out so it's easier to check for the differences (and hopefully one day they can be the same - btw, we're not doing target asan for Ubuntu).

The targets were not testing aren't straightforward to achieve, at least with Homebrew. e.g. valgrind would come from an alternative source, gcov and gprof supposedly comes from Command Line Tools, but I can't seem to find gcov after installing those, and gprof's been deprecated, ...

If all goes well this can still be an acceptable first base for building upon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If debug and opt work then the rest should also work. No need to make things extra complicated in macOS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @garazdawi. I tried it with debug opt gcov, for example, and stuff started failing (thus the if). I didn't want to dig further, since I believed this was Ok for a first step, but maybe I could open a pull request where I add just gcov (so you can see the issue) and maybe have your 👀.

else
echo 'KERL_RELEASE_TARGET=debug opt gcov gprof valgrind lcnt' >> $GITHUB_ENV
fi
- name: Git checkout
uses: actions/checkout@v3
- name: Update OTP releases
Expand Down