Skip to content

make work in truenas scale #52

make work in truenas scale

make work in truenas scale #52

Workflow file for this run

name: ci
on:
push:
branches: "main"
pull_request:
branches: "*"
jobs:
dot_deno_version:
runs-on: ubuntu-22.04
outputs:
value: ${{ steps.dot_deno_version.outputs.value }}
steps:
- uses: actions/checkout@v4
- id: dot_deno_version
run: |
echo "value=$(cat .deno-version)" >> "${GITHUB_OUTPUT}"
make:
runs-on: "${{ matrix.os }}"
needs: dot_deno_version
name: "${{ matrix.os }}: make ${{ matrix.target }} w/ deno ${{ matrix.deno_version }}"
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-20.04"
- "ubuntu-22.04"
- "macos-14"
- "macos-14-arm64"
target:
- "clean all"
- "test"
- "docker-test"
- "docker-output-test"
deno_version:
- "not installed"
- "1.0.0"
- "${{ needs.dot_deno_version.outputs.value }}"
- "^1"
steps:
- id: should_run
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
# always run on linux
if [[ "${{ matrix.os }}" != "macos"* ]]; then
echo "value=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
# deno 1.0.0 was never released for macos
if [[ "${{ matrix.deno_version }}" == "1.0.0" ]]; then
echo "value=false" >> "${GITHUB_OUTPUT}"
exit 0
fi
# only run target "test" on macos
if [[ "${{ matrix.target }}" == "test" ]]; then
echo "value=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
echo "value=false" >> "${GITHUB_OUTPUT}"
- id: needs_deno_installed
if: steps.should_run.outputs.value == 'true'
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
if [[ "${{ matrix.deno_version }}" == "not installed" ]]; then
echo "value=false" >> "${GITHUB_OUTPUT}"
else
echo "value=true" >> "${GITHUB_OUTPUT}"
fi
- uses: actions/checkout@v4
if: steps.should_run.outputs.value == 'true'
- name: delete any deno binaries on PATH
if: steps.should_run.outputs.value == 'true' && steps.needs_deno_installed.outputs.value == 'false'
shell: bash
run: |
set -euo pipefail
IFS=$'\n\t'
delete_next_deno() {
local deno_path
deno_path="$(command -v deno || :)"
if [[ -z "${deno_path}" ]]; then
return 1
fi
if ! [[ -x "${deno_path}" ]]; then
return 1
fi
echo "deleting ${deno_path}"
rm -f "${deno_path}"
}
while delete_next_deno; do
:
done
! deno --version
- name: setup deno ${{ matrix.deno-version }}
if: steps.should_run.outputs.value == 'true' && steps.needs_deno_installed.outputs.value == 'true'
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
- name: make ${{ matrix.target }}
if: steps.should_run.outputs.value == 'true'
run: make ${{ matrix.target }}