Skip to content

chore: use absolute path to rustup #102

chore: use absolute path to rustup

chore: use absolute path to rustup #102

Workflow file for this run

name: CI
#on:
# pull_request:
# push:
# branches: master
on: [push]
env:
MSRV: 1.63
RUSTFLAGS: "-Dwarnings"
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
set-msrv:
runs-on: ubuntu-latest
outputs:
msrv: ${{ steps.msrv.outputs.msrv }}
steps:
- uses: actions/checkout@v4
- 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.
rust: 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.rust }} -y
source $HOME/.cargo/env
run: |
echo "vmx: one"
$HOME/.cargo/bin/rustup override set ${{ matrix.rust }}
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:
# needs: set-msrv
# strategy:
# matrix:
# include:
# # 32-bit Linux/x86
# - target: i686-unknown-linux-gnu
# rust: ${{needs.set-msrv.outputs.msrv}}
# deps: sudo apt update && sudo apt install gcc-multilib
# - target: i686-unknown-linux-gnu
# rust: stable
# deps: sudo apt update && sudo apt install gcc-multilib
#
# # 64-bit Linux/x86_64
# - target: x86_64-unknown-linux-gnu
# rust: ${{needs.set-msrv.outputs.msrv}}
# - target: x86_64-unknown-linux-gnu
# rust: stable
#
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ matrix.rust }}
# target: ${{ matrix.target }}
# - name: Install opencl
# run: sudo apt-get install -y ocl-icd-opencl-dev
# - run: ${{ matrix.deps }}
# - run: cargo test --target ${{ matrix.target }}
# - run: cargo test --target ${{ matrix.target }} --features portable
#
# # macOS tests
# macos:
# needs: set-msrv
# strategy:
# matrix:
# toolchain:
# - ${{needs.set-msrv.outputs.msrv}}
# - stable
#
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ matrix.rust }}
# target: x86_64-apple-darwin
# - run: cargo test
# - run: cargo test --features portable
#
# # Windows tests
# windows:
# needs: set-msrv
# strategy:
# matrix:
# include:
# # 64-bit Windows (MSVC)
# - target: x86_64-pc-windows-msvc
# toolchain: stable
#
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ matrix.rust }}
# target: ${{ matrix.target }}
# - uses: msys2/setup-msys2@v2
# - run: cargo test --target ${{ matrix.target }}
# - run: cargo test --target ${{ matrix.target }} --features portable
#
# clippy_check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ matrix.rust }}
# components: clippy
# - name: Clippy
# run: cargo clippy --all-features
#
# check_fmt_and_docs:
# name: Checking fmt and docs
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ matrix.rust }}
# components: rustfmt
#
# - name: setup
# run: |
# rustup component add rustfmt
# rustc --version
# - name: fmt
# run: cargo fmt --all -- --check
#
# - name: Docs
# run: cargo doc
# Benchmarks need a nightly Rust
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- name: Run cargo bench
run: cargo +nightly bench