Skip to content

Commit

Permalink
ci(github): mv sudo, gmake test out of script
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed May 10, 2024
1 parent 5572079 commit ae6fced
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/ci.sh

This file was deleted.

17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run CI script
run: .github/workflows/ci.sh
- name: Install dependencies
run: |
.github/workflows/install-deps.sh
- name: Test
run: |
gmake test
test-bsd:
runs-on: ${{ matrix.os.host }}
strategy:
Expand All @@ -30,11 +35,15 @@ jobs:
uses: actions/checkout@v4

- name: Run CI script on ${{ matrix.os.name }}
uses: cross-platform-actions/action@v0.22.0
uses: cross-platform-actions/action@v0.24.0
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
shell: bash
run: |
.github/workflows/ci.sh
# 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
20 changes: 20 additions & 0 deletions .github/workflows/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh
set -e

if [ "$(uname)" = Linux ]; then
apt install -y graphicsmagick
fi

if [ "$(uname)" = FreeBSD ]; then
pkg install -y gmake GraphicsMagick tcl86
ln -s /usr/local/bin/tclsh8.6 /usr/local/bin/tclsh
fi

if [ "$(uname)" = NetBSD ]; then
pkgin -y install gmake GraphicsMagick tcl
fi

if [ "$(uname)" = OpenBSD ]; then
pkg_add -I gmake GraphicsMagick tcl%8.6
ln -s /usr/local/bin/tclsh8.6 /usr/local/bin/tclsh
fi

0 comments on commit ae6fced

Please sign in to comment.