# This workflow verifies libtock-rs is usable on Mac OS.

name: ci-mac-os

# We run this workflow during pull request review, but not for Bors merges, as
# it takes over an hour to run.
on: pull_request

jobs:
  ci-mac-os:
    runs-on: macos-10.15

    steps:
      # Clones a single commit from the libtock-rs repository. The commit cloned
      # is a merge commit between the PR's target branch and the PR's source.
      - name: Clone repository
        uses: actions/checkout@v2.3.0

      # Install the toolchains we need, then run `cargo build`.
      - name: Build and Test
        run: |
          brew tap riscv/riscv
          brew update
          brew install riscv-gnu-toolchain --with-multilib
          cd "${GITHUB_WORKSPACE}"
          LIBTOCK_PLATFORM=hifive1 cargo build -p libtock_runtime \
            --target=riscv32imac-unknown-none-elf

# This workflow verifies libtock-rs is usable on Mac OS.

name: ci-mac-os

# We run this workflow during pull request review, but not for Bors merges. We
# can change this if the workflow is reasonably quick and reliable.
on: pull_request

jobs:
  ci-mac-os:
    runs-on: macos-10.15

    steps:
      # Clones a single commit from the libtock-rs repository. The commit cloned
      # is a merge commit between the PR's target branch and the PR's source.
      - name: Clone repository
        uses: actions/checkout@v2

      # The brew commands are spread out over multiple steps so we can see the
      # timings for each step in GitHub Actions' dashboard.
      - name: Brew tap ARMmbed
        run: brew tap ARMmbed/homebrew-formulae

      - name: Brew update
        run: brew update

      - name: Brew install
        run: brew install arm-none-eabi-gcc

      - name: Build and Test
        run: |
          cd "${GITHUB_WORKSPACE}"
          LIBTOCK_PLATFORM=nrf52 cargo build -p libtock_runtime \
            --target=thumbv7em-none-eabi

Switch Mac OS' CI to ARM.
Switch Mac OS' CI to ARM.

Hopefully installing the ARM toolchain will be faster and more reliable than installing the RISC-V toolchain. While I was editing the file, I changed he `checkout` action version to `v2`, so we should get automatic upgrades (I'm assuming it is relatively stable).
