Fix path for powershell #115
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
name: Test | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
tests: | |
name: >- | |
${{ matrix.version }} on | |
${{ (contains(matrix.os, 'macos') && 'mac') || (contains(matrix.os, 'ubuntu') && 'linux') || (contains(matrix.os, 'windows') && 'win') || matrix.os }} | |
${{ matrix.cache && '+cache' || '' }} ${{ matrix.gcc && '+gcc' || '' }} ${{ matrix.root-win-path && '+fix-path' || '' }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
version: | |
- latest # actual version | |
- 2.4.1 # specified version | |
cache: [true, false] | |
gcc: [true, false] | |
root-win-path: [true, false] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install SDK | |
id: installer | |
uses: ./ | |
with: | |
version: ${{ matrix.version }} | |
cache: ${{ matrix.cache }} | |
gcc: ${{ matrix.gcc }} | |
root-win-path: ${{ matrix.root-win-path }} | |
- name: outputs | |
run: | | |
[ -d "${{ steps.installer.outputs.root }}" ] || (echo "::error ::Missing output SDK root" && exit 1) | |
# [ -z "${{ steps.installer.outputs.version }}" ] || (echo "::error ::Missing output version" && exit 1) | |
echo "version: ${{ steps.installer.outputs.version }}" | |
- name: ENV | |
run: | | |
[ -d "$PLAYDATE_SDK_PATH" ] || (echo "::error ::Missing output PLAYDATE_SDK_PATH" && exit 1) | |
- name: equality | |
if: runner.os != 'Windows' || !matrix.root-win-path | |
run: | | |
[ "$PLAYDATE_SDK_PATH" == "${{ steps.installer.outputs.root }}" ] || (echo "::error ::Env not eq output: PLAYDATE_SDK_PATH" && exit 1) | |
- name: inequality | |
if: runner.os == 'Windows' && matrix.root-win-path | |
run: | | |
echo "env: $PLAYDATE_SDK_PATH == ${{ steps.installer.outputs.root }}" | |
if ${{ steps.installer.outputs.root == env.PLAYDATE_SDK_PATH }}; then | |
echo "::error ::Env is eq output: PLAYDATE_SDK_PATH" | |
exit 1 | |
fi | |
- name: $PATH | |
run: | | |
which pdc || (echo "::error ::Missing pdc from PATH." && exit 1) | |
- name: arm-none-eabi-gcc | |
run: | | |
which arm-none-eabi-gcc || (echo "::error ::Missing arm-none-eabi-gcc from PATH." && exit 1) |