59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
name: Linux Tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-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 ripgrep, pyaudio, gettext, rename
|
|
run: |
|
|
sudo apt update; sudo apt install portaudio19-dev gettext rename
|
|
sudo snap install ripgrep --classic
|
|
# Necessary for now for the cargo cache:
|
|
# https://github.com/actions/cache/issues/133#issuecomment-599102035
|
|
- name: Fix ~/.cargo directory permissions
|
|
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
|
|
- 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: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
- name: Configure project variables
|
|
run: |
|
|
echo "::set-env name=BUILDFLAGS::"
|
|
echo "::set-env name=RSPY_TARGET_DIR::~/target"
|
|
echo "::set-env name=CARGO_TARGET_DIR::~/target"
|
|
- name: Run checks
|
|
run: |
|
|
make check
|
|
- name: Run build
|
|
run: |
|
|
make build
|