Skip to content

Commit

Permalink
chore: make sure MSRV env var is available
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx committed Jul 15, 2024
1 parent 177e464 commit 86d659e
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,49 +23,49 @@ jobs:
- id: msrv
run: echo "::set-output name=msrv::$(echo $MSRV)"

linux_foreign:
strategy:
matrix:
include:
# 64-bit Linux/arm64
- target: aarch64-unknown-linux-gnu
# NOTE vmx 2024-07-15: Use at least Rust 1.68.2 for now, so that we can use the sparse
# index. Without this, the build times out. Once the MSRV is >= 1.68.2, we don't need
# to special case anymore and can use the MSRV instead.
toolchain: 1.68.2
arch: aarch64

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run tests
id: runtests
with:
arch: aarch64
distro: ubuntu22.04

# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}

env: | # YAML, but pipe character is necessary
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
install: |
apt-get update -q -y
apt-get install -q -y ocl-icd-opencl-dev curl build-essential
curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain ${{ matrix.toolchain }} -y
source $HOME/.cargo/env
run: |
echo "vmx: one"
$HOME/.cargo/bin/rustup override set ${{ matrix.toolchain }}
echo "vmx: two"
$HOME/.cargo/bin/cargo test --release --target ${{ matrix.target }}
echo "vmx: three"
$HOME/.cargo/bin/cargo test --release --features portable --target ${{ matrix.target }}
echo "vmx: four"
#linux_foreign:
# strategy:
# matrix:
# include:
# # 64-bit Linux/arm64
# - target: aarch64-unknown-linux-gnu
# # NOTE vmx 2024-07-15: Use at least Rust 1.68.2 for now, so that we can use the sparse
# # index. Without this, the build times out. Once the MSRV is >= 1.68.2, we don't need
# # to special case anymore and can use the MSRV instead.
# toolchain: 1.68.2
# arch: aarch64
#
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# - uses: uraimo/run-on-arch-action@v2
# name: Run tests
# id: runtests
# with:
# arch: aarch64
# distro: ubuntu22.04
#
# # Not required, but speeds up builds by storing container images in
# # a GitHub package registry.
# githubToken: ${{ github.token }}
#
# env: | # YAML, but pipe character is necessary
# CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
#
# install: |
# apt-get update -q -y
# apt-get install -q -y ocl-icd-opencl-dev curl build-essential
# curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain ${{ matrix.toolchain }} -y
# source $HOME/.cargo/env
#
# run: |
# echo "vmx: one"
# $HOME/.cargo/bin/rustup override set ${{ matrix.toolchain }}
# echo "vmx: two"
# $HOME/.cargo/bin/cargo test --release --target ${{ matrix.target }}
# echo "vmx: three"
# $HOME/.cargo/bin/cargo test --release --features portable --target ${{ matrix.target }}
# echo "vmx: four"

# Linux tests
linux:
Expand Down Expand Up @@ -141,6 +141,7 @@ jobs:
- run: cargo test --target ${{ matrix.target }} --features portable

clippy_check:
needs: set-msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -152,6 +153,7 @@ jobs:
run: cargo clippy --all-features

check_fmt_and_docs:
needs: set-msrv
name: Checking fmt and docs
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 86d659e

Please sign in to comment.