Add build.zig #205
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu | |
on: | |
- pull_request | |
jobs: | |
build_by_meson: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Downloading dependencies 📥 | |
run: | | |
sudo apt-get install build-essential meson libgtksourceviewmm-3.0-dev libgtkmm-3.0-dev libgtk-4-dev libgtksourceview-5-dev gi-docgen | |
sudo apt-get install qtbase5-dev qttools5-dev-tools | |
- name: Configure 🔧 | |
run: meson _build -DTARGET_DOCUMENTATION=true | |
- name: Compile 🎲 | |
run: ninja -C _build | |
- name: Compress build artifacts 📦 | |
run: | | |
pushd _build | |
tar -c * | zstd -o $GITHUB_WORKSPACE/artifacts.tar.zst | |
popd | |
- name: Upload build artifacts 📤 | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Build artifacts | |
path: artifacts.tar.zst | |
build_by_cmake: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
steps: | |
- name: Downloading Source Code 📥 | |
uses: actions/checkout@v2 | |
- name: Downloading dependencies 📥 | |
run: | | |
sudo apt-get install build-essential meson libgtksourceviewmm-3.0-dev libgtkmm-3.0-dev libgtk-4-dev libgtksourceview-5-dev | |
sudo apt-get install qtbase5-dev qttools5-dev-tools | |
- name: Configure 🔧 | |
run: | | |
cd ${{ github.workspace }} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_AUTO_FONT_FIND=ON -DCAIRO=ON -DBUILD_EXAMPLE_GTKMM=ON -DGTK=ON -DBUILD_EXAMPLE_GTK=ON -DQT=ON -DBUILD_EXAMPLE_QT=ON -DBUILD_EXAMPLE_QTPNG=ON -DBUILD_EXAMPLE_MEMCHECK=ON -DWASM=OFF -DHAVE_LOG=ON -G Ninja | |
- name: Compile 🎲 | |
run: | | |
cd ${{ github.workspace }} | |
cd build | |
ninja | |
build_wasm: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
steps: | |
- name: Downloading Source Code 📥 | |
uses: actions/checkout@v2 | |
- name: Downloading dependencies 📥 | |
run: | | |
sudo apt-get install ninja-build | |
sudo pip3 install meson # meson provided by ubuntu is too old. can be removed when ubunut-latest swiches to 24.04 | |
- name: Setup Emscripten Environment 🍺 | |
uses: mymindstorm/setup-emsdk@v11 | |
- name: Verify Emscripten 🚀 | |
run: emcc -v | |
- name: Compile using CMake 🎲 | |
run: | | |
cd ${{ github.workspace }} | |
cd platform/wasm/web | |
npm install | |
npm run build:lib && npm run build:example | |
- name: Compile using Meson 🎲 | |
run: | | |
cd ${{ github.workspace }} | |
cd platform/wasm/web | |
npm install | |
npm run build:lib:meson && npm run build:example:meson | |
- name: Upload build artifacts 📤 | |
uses: actions/upload-artifact@v1 | |
with: | |
name: MicroTeX wasm example | |
path: platform/wasm/web/example-dist |