Skip to content

Bump numpy from 1.24.2 to 1.26.3 #355

Bump numpy from 1.24.2 to 1.26.3

Bump numpy from 1.24.2 to 1.26.3 #355

Workflow file for this run

on: [push]
name: rust
env:
RUST_MIN_STACK: 524288000
jobs:
build_and_test:
name: Build binary, test, and check format
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
os: ubuntu-22.04,
}
- {
os: windows-2022,
}
- {
os: macos-11,
}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install OpenSSL
if: startsWith(matrix.config.os, 'windows')
run: choco install openssl --limit-output
- name: Set OPENSSL_DIR
if: startsWith(matrix.config.os, 'windows')
run: echo "OPENSSL_DIR=C:/Program Files/OpenSSL-Win64" >> $env:GITHUB_ENV
- name: Check code
run: cargo check
- name: Check tests
run: cargo test
- name: Check format
run: cargo fmt --all -- --check
- name: Check Clippy
run: cargo clippy -- -D warnings
deploy:
name: Create binaries ${{ matrix.config.target }}
needs: build_and_test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
os: ubuntu-22.04,
target: "x86_64-unknown-linux-gnu"
}
- {
os: windows-2022,
target: "x86_64-pc-windows-msvc"
}
- {
os: macos-11,
target: "x86_64-apple-darwin"
}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install OpenSSL
if: startsWith(matrix.config.os, 'windows')
run: choco install openssl --limit-output
- name: Set OPENSSL_ROOT_DIR
if: startsWith(matrix.config.os, 'windows')
run: echo "OPENSSL_ROOT_DIR=C:/Program Files/OpenSSL-Win64" >> $env:GITHUB_ENV
- name: Install cargo-strip
run: cargo install --force cargo-strip
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.config.target }}
- uses: Swatinem/rust-cache@v2
- name: Build target
run: |
cargo build --release --target ${{ matrix.config.target }}
cargo strip
- name: Package all targets
shell: bash
if: ${{ !contains(matrix.config.target, 'windows') }}
run: |
BIN=generic-anon-ake
BIN_NAME=${BIN}
TARGET=${{ matrix.config.target }}
if [[ ${TARGET} == *"darwin"* ]]; then
brew install coreutils
fi
cd target/${TARGET}/release
if [[ ${TARGET} != *"windows"* ]]; then
rm -rf *.d
sha256sum ${BIN}* > digest.sha256
fi
zip ../../../${BIN}-${TARGET}.zip ${BIN_NAME}* digest.sha256
cd -
- name: Package all targets for Windows
if: ${{ contains(matrix.config.target, 'windows') }}
shell: bash
run: |
BIN=generic-anon-ake
BIN_NAME=${BIN}.exe
TARGET=${{ matrix.config.target }}
cd target/${TARGET}/release
rm -rf *.d
ls -lah .
sha256sum ${BIN}* > digest.sha256
tar.exe acvf ../../../${BIN}-${TARGET}.zip ${BIN}* digest.sha256
cd -
- name: Add to Releases
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
generateReleaseNotes: true
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
benchmark:
name: Run benchmark
if: startsWith(github.ref, 'refs/tags/')
needs: build_and_test
runs-on: ubuntu-22.04
steps:
- name: Check machine info
run: lscpu
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Create directory
run: mkdir -p target/criterion
- name: Run benchmark
run: cargo bench
- name: Set Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Generate graphics
run: |
pip install -r graphics/requirements.txt
python graphics/generate_graphics.py
- name: Package results
shell: bash
run: |
zip -r benchmark-linux.zip target/criterion/*
- name: Add to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}