Skip to content

Attempt to fix windows build #211

Attempt to fix windows build

Attempt to fix windows build #211

Workflow file for this run

name: NoteKit CI
on:
- push
- pull_request
jobs:
Linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Downloading dependencies 📥
run: sudo apt-get install build-essential meson libfontconfig1-dev zlib1g-dev libgtksourceviewmm-3.0-dev libgtkmm-3.0-dev libtinyxml2-dev libjsoncpp-dev
- name: Configure 🔧
run: meson _build --default-library static
- name: Compile 🎲
run: ninja -C _build
- name: Compress build artifacts 📦
run: |
pushd _build
tar -c * | zstd -o $GITHUB_WORKSPACE/x86_64-linux-gnu.tar.zst
popd
- name: Upload build artifacts 📤
uses: actions/upload-artifact@v1
with:
name: Build artifacts (Linux)
path: x86_64-linux-gnu.tar.zst
MinGW:
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:33
options: --privileged
steps:
- uses: actions/checkout@v2
- name: Download dependencies 📥
run: |
dnf install -y "dnf-command(config-manager)" curl git patch tar zstd
dnf install -y gcc-c++ meson
dnf install -y mingw64-filesystem mingw64-gcc-c++
dnf install -y mingw64-winpthreads-static
dnf install -y mingw64-gtkmm30 mingw64-gtksourceviewmm3 mingw64-jsoncpp mingw64-zlib mingw64-fontconfig mingw64-librsvg2
- name: Install cLaTeXMath 🖋
run: |
dnf config-manager --add-repo https://download.opensuse.org/repositories/home:sp1rit:mingw/Fedora_33/home:sp1rit:mingw.repo
dnf install -y mingw64-clatexmath mingw64-clatexmath-static
- name: Configure 🔧
run: meson --prefix=/ --cross-file=/usr/share/mingw/toolchain-mingw64.meson --default-library shared bin-x86_64-w64-mingw32
- name: Compile 🎲
run: ninja -C bin-x86_64-w64-mingw32
- name: Compress build artifacts 📦
run: |
pushd bin-x86_64-w64-mingw32
tar -c * | zstd -o $GITHUB_WORKSPACE/x86_64-w64-mingw32.tar.zst
popd
- name: Upload build artifacts 📤
uses: actions/upload-artifact@v2
with:
name: Build artifacts (Windows MinGW)
path: x86_64-w64-mingw32.tar.zst
Darwin:
strategy:
matrix:
os:
- name: Linux Homebrew
id: ubuntu-latest
triplet: x86_64-linux-gnu
- name: OS X
id: macos-latest
triplet: x86_64-apple-darwin
runs-on: ${{ matrix.os.id }}
steps:
- uses: actions/checkout@v2
- name: Set up Homebrew 🍺
uses: Homebrew/actions/setup-homebrew@master
- name: Download dependencies 📥
run: |
brew install meson ninja pkg-config
brew install fontconfig gtkmm3 gtksourceviewmm3 jsoncpp librsvg zlib
brew install -s sp1ritCS/tap/clatexmath
- name: Patch NoteKit 🩹
run: patch -p1 < Apple/llvm.patch
- name: Configure 🔧
if: ${{ matrix.os.triplet == 'x86_64-apple-darwin' }}
run: |
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
meson ${{ matrix.os.triplet }}
- name: Compile 🎲
if: ${{ matrix.os.triplet == 'x86_64-apple-darwin' }}
run: ninja -C ${{ matrix.os.triplet }}
- name: Build in Brew shell 🧮
if: ${{ matrix.os.triplet == 'x86_64-linux-gnu' }}
run: |
brew sh <<EOF
export HOMEBREW_CC=$(brew list gcc | grep "/bin/gcc-[0-9]*$" | head -n1)
export HOMEBREW_CXX=$(brew list gcc | grep "/bin/g++-[0-9]*$" | head -n1)
meson ${{ matrix.os.triplet }}
$(brew list ninja | grep "bin/ninja$" | head -n1) -C ${{ matrix.os.triplet }}
exit
EOF
- name: Compress build artifacts 📦
run: |
pushd ${{ matrix.os.triplet }}
tar -c * | zstd -o $GITHUB_WORKSPACE/${{ matrix.os.triplet }}.tar.zst
popd
- name: Upload build artifacts 📤
uses: actions/upload-artifact@v1
with:
name: Build artifacts (${{ matrix.os.name }})
path: ${{ matrix.os.triplet }}.tar.zst