Skip to content

Add bootstrap test on Alpine Linux #558

Add bootstrap test on Alpine Linux

Add bootstrap test on Alpine Linux #558

Workflow file for this run

name: Test bootstrap
on:
push:
pull_request:
release:
types: [published]
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
test-bootstrap:
name: |
${{ matrix.platform.os_name }} - ${{ matrix.platform.script }} - ${{ ( matrix.tag == '' && 'no tag' ) || matrix.tag }}
runs-on: ${{ matrix.platform.os }}
container: ${{ matrix.platform.container }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: Linux
os: ubuntu-latest
script: bootstrap-ubi.sh
- os_name: Alpine Linux (ash)
os: ubuntu-latest
container:
image: rust:alpine
env:
GITHUB_TOKEN: ${{ github.token }}
volumes:
- "${{ github.workspace }}:/workspace"
options: "--workdir /workspace"
script: bootstrap-ubi.sh
- os_name: macOS
os: macOS-latest
script: bootstrap-ubi.sh
- os_name: Windows
os: windows-latest
script: bootstrap-ubi.ps1
# Curl seems to be broken in this environment for some reason. See here for an example -
# https://github.com/houseabsolute/ubi/actions/runs/10022996389/job/27703398529
#
# - os_name: Windows
# os: windows-latest
# script: bootstrap-ubi.sh
tag:
- ""
- v0.1.1
exclude:
- platform:
os: windows-latest
tag: v0.1.1
steps:
- uses: actions/checkout@v4
- name: Run bootstrap script
shell: bash
run: |
set -e
mkdir -p "$HOME/bin"
UBI_DEBUG_BOOTSTRAP=1 TAG="${ matrix.tag }" ./bootstrap/${{ matrix.platform.script }}
if [ ! -x "$HOME/bin/ubi" ]; then
echo "Running ./bootstrap/${{ matrix.platform.script }} did not install ubi!"
exit 1
fi
"$HOME/bin/ubi" --project houseabsolute/precious --in "$HOME/bin"
if [ ! -x "$HOME/bin/precious" ]; then
echo "Running ubi did not install precious!"
exit 1
fi
exit 0
if: ${{ matrix.platform.script == 'bootstrap-ubi.sh' }}
- name: Run bootstrap script
shell: powershell
run: |
powershell -exec bypass ./bootstrap/bootstrap-ubi.ps1
if ( -not( Test-Path -Path "ubi.exe" ) ) {
Write-Host "Running ./bootstrap/${{ matrix.platform.script }} did not install ubi!"
exit 1
}
./ubi.exe --project houseabsolute/precious --in "."
if ( -not( Test-Path -Path "precious.exe" ) ) {
Write-Host "Running ubi did not install precious!"
exit 2
}
exit 0
if: ${{ matrix.platform.script == 'bootstrap-ubi.ps1' }}