ic-rusqlite 0.1.1

The project provides easy-to-use library to enable SQLite in your Internet Computer canister.
name: Tests

on:
  [push]

env:
  CARGO_TERM_COLOR: always
  TERM: xterm-256color

jobs:

  build:
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            arch: x64
#          - os: ubuntu-latest
#            arch: arm64
          - os: macos-latest
            arch: x64
          - os: macos-latest
            arch: arm64


    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust
        run: |
          rustup update ${{ matrix.rust }} --no-self-update
          rustup default ${{ matrix.rust }}
          rustup target add wasm32-wasip1

      - name: Download WASI-SDK
        run: |
          echo "Detected OS: ${{ matrix.os }}"
          echo "Detected Arch: ${{ matrix.arch }}"

          if [[ "${{ matrix.os }}" == "ubuntu-latest" && "${{ matrix.arch }}" == "x64" ]]; then
            curl -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz
            export WASI_SDK=`pwd`/wasi-sdk-27.0-x86_64-linux
          elif [[ "${{ matrix.os }}" == "ubuntu-latest" && "${{ matrix.arch }}" == "arm64" ]]; then
            curl -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-arm64-linux.tar.gz
            export WASI_SDK=`pwd`/wasi-sdk-27.0-arm64-linux
          elif [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "x64" ]]; then
            curl -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-macos.tar.gz
            export WASI_SDK=`pwd`/wasi-sdk-27.0-x86_64-macos
          elif [[ "${{ matrix.os }}" == "macos-latest" && "${{ matrix.arch }}" == "arm64" ]]; then
            curl -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-arm64-macos.tar.gz
            export WASI_SDK=`pwd`/wasi-sdk-27.0-arm64-macos
          else
            echo "Unsupported OS/Architecture combination"
            exit 1
          fi

          echo "WASI_SDK=$WASI_SDK" >> $GITHUB_ENV

          tar -xzf wasi-sdk.tar.gz

          echo "$WASI_SDK/bin" >> $GITHUB_PATH
          
      - name: Check clang install
        run: |
          echo `which clang`
          clang --version

      - name: Check WASI_SDK
        run: |
          echo WASI_SDK...
          echo $WASI_SDK
          echo ...

      - name: Build
        run: cargo build --release --target wasm32-wasip1