Skip to content

Add test workflow

Add test workflow #9

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_and_test:
runs-on: ubuntu-22.04
env:
platform: linux-musl
channel: stable
target: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: |
gh release download --repo cross-rs/cross --pattern '*linux-musl*'
tar -xvzf cross-x86_64-unknown-linux-musl.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ci/set_rust_version.bash $channel $target
- run: ci/build.bash $PWD/cross $target
- run: ci/test.bash $PWD/cross $target