2024-04-29 23:36:11 +00:00
|
|
|
name: Generic zig build
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
- '!zig-develop*'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: elerch/setup-zig@v3
|
|
|
|
with:
|
2024-06-08 17:22:23 +00:00
|
|
|
version: 0.13.0
|
2024-05-01 03:18:07 +00:00
|
|
|
- uses: elerch/zig-action-cache@v1.1.6
|
2024-05-01 05:21:38 +00:00
|
|
|
- name: Install system dependencies (Github)
|
|
|
|
if: env.GITEA_ACTIONS != 'true'
|
2024-05-01 05:14:37 +00:00
|
|
|
run: |
|
2024-05-01 05:16:19 +00:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install fonts-hack # imagemagick (container has imagemagick, but version 6)
|
2024-05-01 05:14:37 +00:00
|
|
|
curl -LOs https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-31.tar.gz
|
|
|
|
tar xzf 7.1.1-31.tar.gz
|
|
|
|
cd ImageMagick-7.1.1-31/
|
2024-05-01 05:16:19 +00:00
|
|
|
./configure && sudo make install && sudo ldconfig /usr/local/lib
|
2024-05-01 05:14:37 +00:00
|
|
|
cd ..
|
2024-05-01 05:21:38 +00:00
|
|
|
- name: Install system dependencies (Gitea)
|
|
|
|
if: env.GITEA_ACTIONS == 'true'
|
|
|
|
run: |
|
|
|
|
apt-get update
|
|
|
|
apt-get install fonts-hack # imagemagick (container has imagemagick, but version 6)
|
|
|
|
curl -LOs https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-31.tar.gz
|
|
|
|
tar xzf 7.1.1-31.tar.gz
|
|
|
|
cd ImageMagick-7.1.1-31/
|
|
|
|
./configure && make install && ldconfig /usr/local/lib
|
|
|
|
cd ..
|
2024-04-29 23:36:11 +00:00
|
|
|
- name: Build project
|
|
|
|
run: zig build --summary all
|
|
|
|
- name: Run tests
|
|
|
|
run: zig build test --summary all
|
|
|
|
- name: Notify
|
|
|
|
uses: elerch/action-notify-ntfy@v2.github
|
2024-05-01 05:39:13 +00:00
|
|
|
if: always() && env.GITEA_ACTIONS == 'true'
|
2024-04-29 23:36:11 +00:00
|
|
|
with:
|
|
|
|
host: ${{ secrets.NTFY_HOST }}
|
|
|
|
topic: ${{ secrets.NTFY_TOPIC }}
|
|
|
|
status: ${{ job.status }}
|
|
|
|
user: ${{ secrets.NTFY_USER }}
|
|
|
|
password: ${{ secrets.NTFY_PASSWORD }}
|