mirror of
https://github.com/ankitects/anki.git
synced 2026-01-16 07:19:01 -05:00
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: Mac Tests
|
|
|
|
# on: [push, pull_request]
|
|
# Disables Mac OS builds until this gets fixed
|
|
# https://github.com/actions/virtual-environments/issues/602
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- '**'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.7
|
|
- name: Set up protoc
|
|
uses: Arduino/actions/setup-protoc@master
|
|
- name: Set up node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12
|
|
- name: Set up brew packages
|
|
run: |
|
|
brew install portaudio protobuf gettext rename ripgrep
|
|
brew link gettext --force
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
|
- name: Cache cargo index
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/git
|
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/target
|
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
|
|
- name: Cache pip wheels
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/Library/Caches/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
- name: Run checks
|
|
run: |
|
|
export RSPY_TARGET_DIR=~/target
|
|
export CARGO_TARGET_DIR=~/target
|
|
make check BUILDFLAGS=""
|
|
- name: Run build
|
|
run: |
|
|
export RSPY_TARGET_DIR=~/target
|
|
export CARGO_TARGET_DIR=~/target
|
|
make build BUILDFLAGS=""
|