Copyback from VM (test) #8
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: Copyback from VM (test) | |
env: | |
# build job configuration | |
STYLE_FAIL_ON_FAULT: true ## (bool) fail if the build job contains a fault (error or warning); may be overridden on a per-job basis | |
# cargo-nextest version to build | |
NEXTEST_VERSION: "0.9.66" | |
on: | |
# To run manually workflow | |
workflow_dispatch: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
build: | |
name: Download cargo-nextest | |
runs-on: ubuntu-latest | |
timeout-minutes: 90 | |
# strategy: | |
# fail-fast: false | |
steps: | |
# - name: Get IP for Linux runner | |
# run: ip a | |
- name: Prepare OpenBSD VM and run tests | |
uses: vmactions/[email protected] | |
with: | |
usesh: true | |
sync: rsync | |
# copyback: false | |
# Install requirements | |
prepare: | | |
pkg_add -I bash curl | |
run: | | |
## Prepare and test | |
# implementation modelled after ref: <https://github.com/rust-lang/rustup/pull/2783> | |
# * NOTE: All steps need to be run in this block, otherwise, we are operating back on the Ubuntu host | |
set -e | |
# | |
REPO_NAME=${GITHUB_WORKSPACE##*/} | |
WORKSPACE_PARENT="/home/runner/work/${REPO_NAME}" | |
WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}" | |
echo "## whoami" | |
whoami | |
## VARs setup | |
# cd "${WORKSPACE}" | |
unset FAIL_ON_FAULT | |
case '${{ env.STYLE_FAIL_ON_FAULT }}' in | |
''|0|f|false|n|no|off) | |
FAULT_TYPE=warning ;; | |
*) | |
FAIL_ON_FAULT=true ; | |
FAULT_TYPE=error ;; | |
esac; | |
FAULT_PREFIX=$(echo "${FAULT_TYPE}" | tr '[:lower:]' '[:upper:]') | |
## Info | |
# environment | |
echo "## environment" | |
echo "CI='${CI}'" | |
echo "REPO_NAME='${REPO_NAME}'" | |
echo "BUILD_USER='${BUILD_USER}'" | |
echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'" | |
echo "WORKSPACE='${WORKSPACE}'" | |
echo "FAULT_PREFIX='${FAULT_PREFIX}'" | |
echo "NEXTEST_VERSION='${{ env.NEXTEST_VERSION }}'" | |
env | sort | |
# tooling info | |
echo "## packages infos" | |
pkg_info | |
## Run build script for cargo-nextest | |
echo "# pwd" | |
pwd | |
echo "# download cargo-nextest sources" | |
curl -L https://github.com/nextest-rs/nextest/archive/refs/tags/cargo-nextest-${{ env.NEXTEST_VERSION }}.tar.gz -o cargo-nextest-${{ env.NEXTEST_VERSION }}.tar.gz | |
echo "# ls -l" | |
ls -l |