Install MacPorts under an arbitrary prefix #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Continuous Integration' | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
- v1 | |
tags-ignore: | |
- v1.* | |
jobs: | |
run-testsuite: | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-12', 'macos-13', 'macos-14'] | |
runs-on: '${{ matrix.os }}' | |
name: 'Run Testsuite' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Run testsuite' | |
run: development/testsuite | |
install-macports: | |
strategy: | |
matrix: | |
os: ['macos-12', 'macos-13', 'macos-14'] | |
version: ['2.9.3'] | |
prefix: ['local'] | |
include: | |
- os: 'macos-14' | |
version: '2.9.3' | |
prefix: 'package' | |
runs-on: '${{ matrix.os }}' | |
name: 'Install MacPorts' | |
needs: 'run-testsuite' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
id: 'macports' | |
with: | |
parameters: 'testsuite/run-testsuite-on-${{ matrix.os }}-${{ matrix.prefix }}.yaml' | |
- name: 'Validate installed MacPorts version' | |
run: >- | |
test "$(port version)" = 'Version: ${{ matrix.version }}' | |
- name: 'Validate transmitted MacPorts prefix' | |
run: >- | |
test "${{ steps.macports.outputs.prefix }}" = '/opt/${{ matrix.prefix }}' | |
- name: 'Validate transmitted MacPorts version' | |
run: >- | |
test "${{ steps.macports.outputs.version }}" = '${{ matrix.version }}' | |
- run: /opt/${{ matrix.prefix }}/bin/port version | |
- run: port version |