Skip to content

Add name/description to 'pkg init'. (#53) #157

Add name/description to 'pkg init'. (#53)

Add name/description to 'pkg init'. (#53) #157

Workflow file for this run

name: CI
on:
push:
jobs:
build:
strategy:
# The matrix will run all possible combinations in parallel.
matrix:
container: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up constants
shell: bash
id: constants
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
echo 'toitpkg=${{ github.workspace }}/build/toitpkg' >> $GITHUB_OUTPUT
elif [ "$RUNNER_OS" == "macOS" ]; then
echo 'toitpkg=${{ github.workspace }}/build/toitpkg' >> $GITHUB_OUTPUT
elif [ "$RUNNER_OS" == "Windows" ]; then
echo 'toitpkg=${{ github.workspace }}\build\toitpkg.exe' >> $GITHUB_OUTPUT
else
echo "UNSUPPORTED RUNNER: $RUNNER_OS"
exit 1
fi
- name: Switch to Go 1.20
uses: actions/setup-go@v5
with:
go-version: "1.20"
- name: Install Toit
id: toit
uses: toitlang/action-setup@v1
with:
toit-version: 'v2.0.0-alpha.158'
- name: Go dependencies
shell: bash
run: |
make go_dependencies
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Build
run: |
make
# Test.
- name: test
env:
TOITPKG_PATH: ${{ steps.constants.outputs.toitpkg }}
TOITVM_PATH: ${{ steps.toit.outputs.toit-sdk-path }}/bin/toit
run: |
make test