This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
name: Continuous Integration test | |
jobs: | |
build-release: | |
name: build-release | |
runs-on: ${{ matrix.job.os }} | |
env: | |
RUST_BACKTRACE: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
job: | |
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-musl", artifact_prefix: "linux-musl", } | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
target: ${{ matrix.job.target }} | |
profile: minimal # minimal component installation (ie, no documentation) | |
- name: Installing needed Ubuntu dependencies | |
if: matrix.job.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev musl-tools xauth xau | |
case ${{ matrix.job.target }} in | |
arm-unknown-linux-*) sudo apt-get -y install gcc-arm-linux-gnueabihf ;; | |
aarch64-unknown-linux-*) sudo apt-get -y install gcc-aarch64-linux-gnu ;; | |
esac | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: ${{ matrix.job.use-cross }} | |
command: build | |
args: --release --verbose --target=${{ matrix.job.target }} | |
toolchain: ${{ matrix.rust }} | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
use-cross: ${{ matrix.job.use-cross }} | |
command: test | |
args: --target=${{ matrix.job.target }} ${{ matrix.job.test-bin }} |