Skip to content

Use toitlang/action-setup #282

Use toitlang/action-setup

Use toitlang/action-setup #282

Workflow file for this run

name: CI
on:
push:
release:
types: [published]
end:

Check failure on line 8 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 8, Col: 1): Unexpected value 'end'
TOIT_VERSION=v2.0.0-alpha.121
jobs:
build:
strategy:
matrix:
# Zlib in Toit is not available on these platforms yet.
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Toit
id: setup-toit
uses: toitlang/action-setup@v1
with:
toit-version: ${{ env.TOIT_VERSION }}
- name: Setup constants
shell: bash
run: |
if [[ "$RUNNER_OS" = "Windows" ]]; then
echo "TOITRUN=toit.run.exe" >> $GITHUB_ENV
echo "TOITPKG=toit.pkg.exe" >> $GITHUB_ENV
echo "TOITC=toit.compile.exe" >> $GITHUB_ENV
else
echo "TOITRUN=toit.run" >> $GITHUB_ENV
echo "TOITPKG=toit.pkg" >> $GITHUB_ENV
echo "TOITC=toit.compile" >> $GITHUB_ENV
fi
# Fetch the dependencies. Different for each platform.
- name: Install dependencies - Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ninja-build
ninja --version
cmake --version
- name: Install dependencies - macOS
if: runner.os == 'macOS'
run: |
brew install ninja
ninja --version
cmake --version
- name: Install dependencies - Windows
if: runner.os == 'Windows'
run: |
choco install ninja
ninja --version
cmake --version
- name: Run cmake
shell: bash
run: |
make rebuild-cmake
cmake "-DTOITRUN=$TOITRUN" "-DTOITPKG=$TOITPKG" "-DTOITC=$TOITC" build
- name: Install packages
run: |
make install-pkgs
- name: Test
run: |
make test