build job: update for release 0.9.75 #19
Workflow file for this run
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
# GH workflow to build and publish cargo-nextest release for OpenBSD-stable | |
name: Build and Publish | |
on: | |
# Run with new tag | |
push: | |
tags: | |
- "*.*.*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build cargo-nextest | |
runs-on: ubuntu-latest | |
steps: | |
# Set NEXTEST_VERSION in env | |
- name: Set NEXT_VERSION env | |
run: echo "NEXTEST_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
# Checkout only build script and script for CI | |
- name: Checkout build script | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
build.sh | |
ci/openbsd_build.sh | |
- name: Prepare OpenBSD VM and build | |
uses: vmactions/[email protected] | |
with: | |
usesh: true | |
sync: rsync | |
copyback: true | |
envs: 'NEXTEST_VERSION' | |
# Install requirements to build cargo-nextest | |
prepare: pkg_add -I bash curl rust zstd | |
# implementation modelled from https://github.com/rust-lang/rustup/blob/master/.github/workflows/ci.yaml | |
# * NOTE: All steps need to be run in this block, otherwise, we are operating back on the Ubuntu host | |
run: bash ci/openbsd_build.sh | |
# Run commands on Ubuntu host | |
- name: Check artifact on Ubuntu runner | |
run: | | |
sudo apt-get install -y file | |
echo "# pwd" | |
pwd | |
echo "# ls -l cargo-nextest-build/target/release/cargo-nextest" | |
ls -l cargo-nextest-build/target/release/cargo-nextest | |
echo "# Check cargo-nextest file" | |
file cargo-nextest-build/target/release/cargo-nextest | |
- name: Upload artifact from build job | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cargo-nextest-${{ env.NEXTEST_VERSION }}-openbsd | |
# Wildcard used to flatten directory hierarchy | |
path: cargo-nextest-build/target/release/*-nextest | |
if-no-files-found: error | |
retention-days: 0 | |
# Job to publish release | |
publish: | |
name: Publish release for cargo-nextest | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# Set NEXTEST_VERSION in env | |
- name: Set NEXT_VERSION env | |
run: echo "NEXTEST_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
- name: Download artifact from build job | |
uses: actions/download-artifact@v4 | |
with: | |
name: cargo-nextest-${{ env.NEXTEST_VERSION }}-openbsd | |
- name: Check artifact on Ubuntu runner | |
run: | | |
sudo apt-get install -y file | |
echo "# pwd" | |
pwd | |
echo "# ls -l cargo-nextest" | |
ls -l cargo-nextest | |
echo "# Check cargo-nextest file" | |
file cargo-nextest | |
- name: Create archive for release | |
run: | | |
chmod +x cargo-nextest | |
tar cvzf cargo-nextest-${{ env.NEXTEST_VERSION }}-openbsd.tar.gz cargo-nextest | |
# Publish new release | |
- name: Publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: cargo-nextest-openbsd ${{ env.NEXTEST_VERSION }} | |
body: "Release for cargo-nextest ${{ env.NEXTEST_VERSION }} - See https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-${{ env.NEXTEST_VERSION }}" | |
# draft: true | |
fail_on_unmatched_files: true | |
files: cargo-nextest-${{ env.NEXTEST_VERSION }}-openbsd.tar.gz |