Update dependencies #195
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- uses: pre-commit/[email protected] | |
build-mac: | |
runs-on: macos-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: [lint] | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: sudo apt install libunwind-dev | |
if: runner.os == 'Linux' | |
- name: Build | |
run: cargo build --verbose --examples --features unwind | |
- name: Run tests | |
run: cargo test --verbose --features unwind | |
build-linux-cross: | |
runs-on: ubuntu-latest | |
needs: [lint] | |
strategy: | |
matrix: | |
target: [i686-musl, x86_64-musl, armv7-musleabihf, aarch64-musl] | |
container: | |
image: docker://benfred/rust-musl-cross:${{ matrix.target }} | |
env: | |
RUSTUP_HOME: /root/.rustup | |
CARGO_HOME: /root/.cargo | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build (unwind) | |
run: cargo build --verbose --features unwind --examples | |
if: matrix.target == 'x86_64-musl' || matrix.target == 'armv7-musleabihf' | |
- name: Build (no-unwind) | |
run: cargo build --verbose --examples | |
if: matrix.target == 'i686-musl' || matrix.target == 'aarch64-musl' | |
# unittests don't compile here - with some duplicate symbol errors. | |
# - name: Run tests | |
# run: cargo test --verbose --features unwind | |
# if: matrix.target == 'x86_64-musl' | |
build-freebsd: | |
runs-on: ubuntu-22.04 | |
needs: [lint] | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
box: | |
- freebsd-14 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache Vagrant box | |
uses: actions/[email protected] | |
with: | |
path: .vagrant.d | |
key: ${{ matrix.box }}-vagrant-boxes-20231115-${{ hashFiles('ci/Vagrantfile') }} | |
restore-keys: | | |
${{ matrix.box }}-vagrant-boxes-20231115- | |
- name: Cache Cargo and build artifacts | |
uses: actions/[email protected] | |
with: | |
path: build-artifacts.tar | |
key: ${{ matrix.box }}-cargo-20231115-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ matrix.box }}-cargo-20231115- | |
- name: Display CPU info | |
run: lscpu | |
- name: Install VM tools | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 moreutils | |
sudo chronic apt-get install -qq -o=Dpkg::Use-Pty=0 vagrant virtualbox qemu libvirt-daemon-system | |
- name: Set up VM | |
shell: sudo bash {0} | |
run: | | |
vagrant plugin install vagrant-libvirt | |
vagrant plugin install vagrant-scp | |
ln -sf ci/Vagrantfile Vagrantfile | |
vagrant status | |
vagrant up --no-tty --provider libvirt ${{ matrix.box }} | |
- name: Build and test | |
shell: sudo bash {0} | |
run: vagrant ssh ${{ matrix.box }} -- bash /vagrant/ci/test_freebsd.sh | |