Skip to content

Version 0.7.4.

Version 0.7.4. #12

Workflow file for this run

name: libspng
on: [push, pull_request]
env:
# Idiotic GitHub Actions "language" can't handle environment variables
# referencing environment variables defined in outer scope, so these aren't
# actually used anywhere BUT INSTEAD THE VERSION IS DUPLICATED, F.F.S.
# ZLIB_VERSION: 1.2.13
# ZLIBNG_VERSION: 2.0.4-579-gbfde
# Version 0.7.3 suffers from https://github.com/randy408/libspng/pull/245
# which makes the static-only build impossible, using 0.7.2 until a new
# version is tagged.
LIBSPNG_VERSION: 0.7.4
jobs:
windows:
name: ${{ matrix.os }}${{ matrix.env.SUFFIX }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
env:
# THIS STUPID CRAP CAN NOT DO `zlib-${{ env.ZLIB_VERSION }}`, FUCK
ZLIB_LIBRARY: zlib-1.2.13
SUFFIX:
- os: windows-2019
env:
# SAME, FUCK
ZLIB_LIBRARY: zlib-ng-2.0.4-579-gbfde
SUFFIX: -zng
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up Visual Studio environment
uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Fetch prebuilt zlib${{ matrix.env.SUFFIX }}
run: |
mkdir deps
cd deps
Invoke-WebRequest https://ci.magnum.graphics/${{ matrix.env.ZLIB_LIBRARY }}-${{ matrix.os }}.zip -O zlib.zip
unzip zlib.zip
- name: Clone libspng
uses: actions/checkout@v3
with:
repository: randy408/libspng
ref: v${{ env.LIBSPNG_VERSION }}
path: libspng
- name: Build & install
shell: cmd
run: |
cmake ^
-DCMAKE_C_COMPILER=cl.exe ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/install ^
-DSPNG_SHARED=OFF ^
-DBUILD_EXAMPLES=OFF ^
-G Ninja -S libspng -B libspng-build
ninja -C libspng-build install
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: libspng-${{ env.LIBSPNG_VERSION }}-${{ matrix.os }}${{ matrix.env.SUFFIX }}
path: install
windows-mingw:
name: windows-mingw${{ matrix.env.SUFFIX }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
env:
# THIS STUPID CRAP CAN NOT DO `zlib-${{ env.ZLIB_VERSION }}`, FUCK
ZLIB_LIBRARY: zlib-1.2.13
SUFFIX:
- os: windows-2019
env:
# SAME, FUCK
ZLIB_LIBRARY: zlib-ng-2.0.4-579-gbfde
SUFFIX: -zng
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up MinGW environment
uses: msys2/setup-msys2@v2
- name: Fetch prebuilt zlib${{ matrix.env.SUFFIX }}
run: |
mkdir deps
cd deps
Invoke-WebRequest https://ci.magnum.graphics/${{ matrix.env.ZLIB_LIBRARY }}-windows-mingw.zip -O zlib.zip
unzip zlib.zip
- name: Clone libspng
uses: actions/checkout@v3
with:
repository: randy408/libspng
ref: v${{ env.LIBSPNG_VERSION }}
path: libspng
- name: Build & install
shell: cmd
run: |
cmake ^
-DCMAKE_C_COMPILER=gcc.exe ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/install ^
-DSPNG_SHARED=OFF ^
-DBUILD_EXAMPLES=OFF ^
-G Ninja -S libspng -B libspng-build
ninja -C libspng-build install/strip
- name: Remove pkgconfig cruft
shell: cmd
run: |
cd install/lib
del pkgconfig /s /q
rmdir pkgconfig /s /q
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: libspng-${{ env.LIBSPNG_VERSION }}-windows-mingw${{ matrix.env.SUFFIX }}
path: install
ubuntu:
name: ${{ matrix.os }}${{ matrix.env.SUFFIX }}
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
env:
# THIS STUPID CRAP CAN NOT DO `zlib-${{ env.ZLIB_VERSION }}`, FUCK
ZLIB_LIBRARY: zlib-1.2.13
SUFFIX:
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
env:
# SAME, FUCK
ZLIB_LIBRARY: zlib-ng-2.0.4-579-gbfde
SUFFIX: -zng
steps:
- name: Install base build tools
# apt update is needed to fetch package lists
run: |
apt update
apt install -y wget unzip ninja-build cmake g++
mkdir -p deps
- name: Fetch prebuilt zlib${{ matrix.env.SUFFIX }}
run: |
cd deps
wget https://ci.magnum.graphics/${{ matrix.env.ZLIB_LIBRARY }}-${{ matrix.os }}.zip
unzip ${{ matrix.env.ZLIB_LIBRARY }}-${{ matrix.os }}.zip
- name: Clone libspng
uses: actions/checkout@v3
with:
repository: randy408/libspng
ref: v${{ env.LIBSPNG_VERSION }}
path: libspng
- name: Build & install
run: |
mkdir libspng-build && cd libspng-build
cmake ../libspng \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$(pwd)/../deps \
-DCMAKE_INSTALL_PREFIX=$(pwd)/../install \
-DSPNG_SHARED=OFF \
-DBUILD_EXAMPLES=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-G Ninja
ninja install/strip
- name: Remove pkgconfig cruft
run: |
rm -r install/lib/pkgconfig
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: libspng-${{ env.LIBSPNG_VERSION }}-${{ matrix.os }}${{ matrix.env.SUFFIX }}
path: install