You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.8 KiB
42 lines
1.8 KiB
parameters: |
|
build_type: '' |
|
cmake_flags: '' |
|
|
|
steps: |
|
- bash: | |
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" |
|
displayName: 'Uninstall brew' |
|
- bash: | |
|
cd /Users |
|
sudo mkdir git-bin |
|
sudo chown $USER git-bin |
|
cd git-bin |
|
curl -L -o gtk-bin.tar.gz https://github.com/xournalpp/xournalpp-pipeline-dependencies/raw/master/gtk/mac/10.13/gtk-bin.tar.gz |
|
tar -xzf gtk-bin.tar.gz |
|
displayName: 'Unpack GTK' |
|
- bash: | |
|
curl -L -o libxml.tar.gz https://github.com/xournalpp/xournalpp-pipeline-dependencies/raw/master/libxml/mac/10.13/libxml.tar.gz |
|
sudo tar -xzf libxml.tar.gz -C / |
|
displayName: 'Unpack libxml' |
|
- bash: | |
|
mkdir build |
|
displayName: 'Create Build Directory' |
|
- bash: | |
|
curl -L -o ninja-mac.zip $(curl -s https://api.github.com/repos/ninja-build/ninja/releases/latest | grep "browser_download_url.*mac\.zip" | cut -d : -f 2,3 | tr -d '"') |
|
# Fallback to version 1.9.0 if the previous request fails for some reason |
|
if [ ! -f ninja-mac.zip ]; then |
|
curl -L -o ninja-mac.zip https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-mac.zip |
|
fi |
|
unzip ninja-mac.zip -d /Users/git-bin/gtk/inst/bin |
|
displayName: 'Get Ninja' |
|
- bash: | |
|
export PATH="$HOME/.local/bin:/Users/git-bin/gtk/inst/bin:$PATH" |
|
cmake -GNinja -DCMAKE_INSTALL_PREFIX:PATH=/Users/git-bin/gtk/inst .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type }} ${{ parameters.cmake_flags }} |
|
# Make sure pot is up to date with sources (maybe translation pipeline is currently running) |
|
cmake --build . --target pot |
|
cmake --build . --target translations |
|
# Build Xournal++ |
|
cmake --build . |
|
cmake --build . --target install |
|
workingDirectory: ./build |
|
displayName: 'Build Xournal++'
|
|
|