-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
[not NetBSD-specific, arbitrarily filing this here because I just filed some other ones here]
As a pkgsrc developer, I'm trying to define a concise-enough workflow to iterate over many Unix platforms, bootstrap the pkgsrc tools, and build the packages I maintain.
For the moment, while I'm figuring out what works, I have just two jobs: one for FreeBSD and one for NetBSD. I noticed the run: command sequence was long and duplicative, so I extracted it to a shell script, which has helped. But I still have a bunch of identical copy-pasted steps before and after the vmactions one.
Before I expand coverage, I'm hoping to express platform-specific details briefly and declaratively. I think I'm wishing for something like this:
jobs:
all-available-vmactions:
name: >
${{ matrix.os.uname }}
${{ matrix.os.arch }}
${{ matrix.os.version }}
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- uname: NetBSD
lname: netbsd
arch: amd64
version: '9.3'
host: ubuntu-latest
vmaction: vmactions/netbsd-vm@v1
prep: |
set -e
/usr/sbin/pkg_add git-base
steps:
[...checkout, restore cache, etc....]
- name: Platform Matrix Build
uses: ${{ matrix.os.vmaction }}
with:
release: ${{ matrix.os.version }}
prepare: |
${{ matrix.os.prep }}
run: |
${{ matrix.os.run }}
[...save cache, publish all artifacts, etc....]Everything about this works except that GitHub seemingly can't perform variable substitution on the uses: step. Grrrr.
Have you found or heard about a way to accomplish the goal of iterating over every vmactions platform in a concise way? I don't want to be asking you to rearchitect your entire offering here as one Action just to work around this limitation of GitHub!