Skip to content

CI

CI #162

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
bsd:
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- name: freebsd
architecture: x86-64
version: '14.1'
host: ubuntu-latest
- name: netbsd
architecture: x86-64
version: '10.0'
host: ubuntu-latest
- name: openbsd
architecture: x86-64
version: '7.5'
host: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run CI script on ${{ matrix.os.name }}
uses: cross-platform-actions/action@v0.25.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
shell: bash
run: |
# Use sudo(1) rather than doas(1) on OpenBSD.
# doas(1) isn't configured.
# See https://github.com/cross-platform-actions/action/issues/75
sudo .github/workflows/install-deps.sh
gmake test
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo .github/workflows/install-deps.sh
- name: Test
run: |
gmake test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hicolor-linux-x86_64
path: |
hicolor
mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
.github/workflows/install-deps.sh
- name: Build and test
run: |
make test
- name: Bundle dynamic libraries
run: |
dylibbundler --bundle-deps --create-dir --fix-file hicolor
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hicolor-macos-arm64
path: |
hicolor
libs/
windows:
runs-on: windows-latest
steps:
- name: 'Disable `autocrlf` in Git'
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
msystem: mingw32
install: |
make
mingw-w64-i686-gcc
mingw-w64-i686-libpng
mingw-w64-i686-pkgconf
mingw-w64-i686-zlib
tcl
- name: Test
shell: msys2 {0}
run: |
make test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hicolor-win32
path: |
hicolor.exe