-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (50 loc) · 1.5 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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@v4
- 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