From 51f4a6d2830211340d95f24c70c778a1901b6ebd Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 30 Apr 2024 22:21:38 -0700 Subject: [PATCH] workaround for lack of sudo in Gitea --- .github/workflows/zig-build.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zig-build.yaml b/.github/workflows/zig-build.yaml index 57f89b9..72ae403 100644 --- a/.github/workflows/zig-build.yaml +++ b/.github/workflows/zig-build.yaml @@ -14,7 +14,8 @@ jobs: with: version: 0.12.0 - uses: elerch/zig-action-cache@v1.1.6 - - name: Install system dependencies + - name: Install system dependencies (Github) + if: env.GITEA_ACTIONS != 'true' run: | sudo apt-get update sudo apt-get install fonts-hack # imagemagick (container has imagemagick, but version 6) @@ -23,6 +24,16 @@ jobs: cd ImageMagick-7.1.1-31/ ./configure && sudo make install && sudo ldconfig /usr/local/lib cd .. + - 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 .. - name: Build project run: zig build --summary all - name: Run tests