Update certificates. #61
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: CI | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup constants | |
shell: bash | |
run: | | |
TOIT_VERSION=v2.0.0-alpha.91 | |
echo "TOIT_VERSION=$TOIT_VERSION" >> $GITHUB_ENV | |
export DOWNLOAD_DIR="${{ github.workspace }}/downloads" | |
echo "DOWNLOAD_DIR=$DOWNLOAD_DIR" >> $GITHUB_ENV | |
if [[ "$RUNNER_OS" = "Linux" ]]; then | |
TOIT_FILE=toit-linux.tar.gz | |
echo "TOIT_EXEC=$DOWNLOAD_DIR/toit/bin/toit.run" >> $GITHUB_ENV | |
echo "TPKG_EXEC=$DOWNLOAD_DIR/toit/bin/toit.pkg" >> $GITHUB_ENV | |
elif [[ "$RUNNER_OS" = "macOS" ]]; then | |
TOIT_FILE=toit-macos.tar.gz | |
echo "TOIT_EXEC=$DOWNLOAD_DIR/toit/bin/toit.run" >> $GITHUB_ENV | |
echo "TPKG_EXEC=$DOWNLOAD_DIR/toit/bin/toit.pkg" >> $GITHUB_ENV | |
elif [[ "$RUNNER_OS" = "Windows" ]]; then | |
TOIT_FILE=toit-windows.tar.gz | |
echo "TOIT_EXEC=$DOWNLOAD_DIR/toit/bin/toit.run.exe" >> $GITHUB_ENV | |
echo "TPKG_EXEC=$DOWNLOAD_DIR/toit/bin/toit.pkg.exe" >> $GITHUB_ENV | |
else | |
echo "UNSUPPORTED RUNNER: $RUNNER_OS" | |
exit 1 | |
fi | |
echo "TOIT_URL=https://github.com/toitlang/toit/releases/download/$TOIT_VERSION/$TOIT_FILE" >> $GITHUB_ENV | |
# 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 | |
- uses: suisei-cn/actions-download-file@v1 | |
name: Download Toit | |
with: | |
url: ${{ env.TOIT_URL }} | |
target: ${{ env.DOWNLOAD_DIR }} | |
- name: Extract Toit | |
shell: bash | |
run: | | |
cd "$DOWNLOAD_DIR" | |
tar x -f *.tar.gz | |
- name: Run cmake | |
shell: bash | |
run: | | |
make rebuild-cmake | |
cmake "-DTOIT_EXEC=$TOIT_EXEC" "-DTPKG_EXEC=$TPKG_EXEC" build | |
- name: Install packages | |
run: | | |
make install-pkgs | |
- name: Test | |
run: | | |
make test |