v1.0.0 #20
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-release-binary | |
on: | |
release: | |
types: [published] | |
env: | |
RUSTFLAGS: "-Dwarnings -C target-cpu=native" | |
RUST_BACKTRACE: 1 | |
ACTIONS_RUNNER_DEBUG: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
binary_name: expander-macos | |
- os: 7950x3d | |
feature: avx2 | |
binary_name: expander-linux-avx2 | |
- os: 7950x3d | |
feature: avx512f | |
binary_name: expander-linux-avx512 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dependencies for MacOS workflow | |
if: matrix.os == 'macos-latest' | |
run: brew install gcc make openmpi | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
prefix-key: "mpi-v5.0.6" | |
- name: Install MPI for MacOS workflow | |
if: matrix.os == 'macos-latest' | |
run: python3 ./scripts/install.py | |
- name: Set RUSTFLAGS for AVX | |
if: matrix.feature != 'macos-latest' | |
run: echo "RUSTFLAGS=$RUSTFLAGS -C target-feature=+${{ matrix.feature }}" >> $GITHUB_ENV | |
- name: Prepare binary | |
run: cargo build --release --bin expander-exec | |
- name: Upload release asset | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const fs = require('fs').promises; | |
github.rest.repos.uploadReleaseAsset({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
release_id: ${{ github.event.release.id }}, | |
name: '${{ matrix.binary_name }}', | |
data: await fs.readFile('target/release/expander-exec') | |
}); |