From d7ba9ba6bb1fc1440828aff9abe7612991370d01 Mon Sep 17 00:00:00 2001 From: Dave Rolsky Date: Sun, 3 Nov 2024 12:35:51 -0600 Subject: [PATCH] Add bootstrap test on Alpine Linux --- .github/workflows/test-bootstrap.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-bootstrap.yml b/.github/workflows/test-bootstrap.yml index 0f0ab66..f087af8 100644 --- a/.github/workflows/test-bootstrap.yml +++ b/.github/workflows/test-bootstrap.yml @@ -14,6 +14,7 @@ jobs: 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: @@ -21,6 +22,16 @@ jobs: - 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 @@ -42,12 +53,21 @@ jobs: tag: v0.1.1 steps: - uses: actions/checkout@v4 + - name: Install curl on Alpine + shell: sh + run: | + apk update + apk add curl + if: matrix.platform.container != null - name: Run bootstrap script - shell: bash + shell: sh run: | set -e mkdir -p "$HOME/bin" + # On Alpine, we run as root so ubi gets installed to /usr/local/bin. + export PATH="$PATH:/usr/local/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!"