Skip to content

Commit

Permalink
Attempt to merge test and cross
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Dec 10, 2020
1 parent af6c551 commit 944f559
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 31 deletions.
45 changes: 14 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,27 @@ jobs:
- crossbeam-queue
- crossbeam-skiplist
- crossbeam-utils
rust:
- 1.36.0
- nightly
os:
- ubuntu-latest
- windows-latest
build:
- { rust: 1.36.0, os: ubuntu-latest }
- { rust: 1.36.0, os: windows-latest }
- { rust: nightly, os: ubuntu-latest }
- { rust: nightly, os: windows-latest }
- { rust: stable, os: ubuntu-latest, target: i686-unknown-linux-gnu }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
run: rustup update ${{ matrix.build.rust }} --no-self-update && rustup default ${{ matrix.build.rust }}
- name: Test
if: matrix.build.target == ''
run: ./ci/${{ matrix.crates }}.sh

# Test crates on non x86_64 architectures.
cross:
strategy:
matrix:
crates:
- crossbeam
- crossbeam-channel
- crossbeam-deque
- crossbeam-epoch
- crossbeam-queue
- crossbeam-skiplist
- crossbeam-utils
target:
- i686-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Install cross
run: cargo install cross
- name: Test
run: cross test --package ${{ matrix.crates }} --target ${{ matrix.target }}
- name: Cross
if: matrix.build.target != ''
run: ./ci/cross.sh
env:
CRATE: ${{ matrix.crates }}
TARGET: ${{ matrix.build.target }}

# Check all feature combinations works properly.
features:
Expand Down
8 changes: 8 additions & 0 deletions ci/cross.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")"/..
set -ex

cargo install cross

cross test --package "$CRATE" --target "$TARGET"

0 comments on commit 944f559

Please sign in to comment.