Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use toit-setup action. #457

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,15 @@ jobs:
submodules: recursive

- name: Setup Toit
shell: bash
run: |
export NATIVE_DOWNLOAD_DIR="${{ github.workspace }}/downloads"
echo "NATIVE_DOWNLOAD_DIR=$NATIVE_DOWNLOAD_DIR" >> $GITHUB_ENV

export DOWNLOAD_DIR="$PWD/downloads"
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV

TOIT_SDK_DIR=$DOWNLOAD_DIR/toit
echo "TOIT_SDK=$TOIT_SDK_DIR" >> $GITHUB_ENV

TOIT_SDK_FILE=toit-$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]').tar.gz
TOIT_SDK_BASE_URL=https://github.com/toitlang/toit/releases

echo "TOIT_SDK_URL=$TOIT_SDK_BASE_URL/download/$TOIT_VERSION/$TOIT_SDK_FILE" >> $GITHUB_ENV

- uses: suisei-cn/[email protected]
name: Download Toit
id: setup-toit
uses: toitlang/action-setup@v1
with:
url: ${{ env.TOIT_SDK_URL }}
target: ${{ env.NATIVE_DOWNLOAD_DIR }}

- name: Extract Toit
shell: bash
run: |
cd "$DOWNLOAD_DIR"
tar x -f *.tar.gz
toit-version: ${{ env.TOIT_VERSION }}

- name: Check snippets
shell: bash
run: |
export TOIT_SDK=${{ steps.setup-toit.outputs.toit-install-dir }}/toit
cd tools
$TOIT_SDK/bin/toit.pkg install
./run_all.sh
Expand Down