mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-09-23 14:27:21 +02:00
ba468fbb4f
These configs and code are adapted from the CI workflow in https://github.com/oconnor663/blake3-py, especially the upload_github_release_asset.py script, which is copied verbatim.
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: publish_b3sum_binaries
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
env:
|
|
BLAKE3_CI: "1"
|
|
RUSTFLAGS: "-D warnings"
|
|
|
|
jobs:
|
|
cargo_tests:
|
|
name: ${{ matrix.target.name }}
|
|
runs-on: ${{ matrix.target.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [
|
|
{ "os": "ubuntu-latest", "rust-target": "x86_64-unknown-linux-musl", "name": "Linux" },
|
|
{ "os": "macOS-latest", "rust-target": "x86_64-apple-darwin", "name": "macOS" },
|
|
{ "os": "windows-latest", "rust-target": "x86_64-pc-windows-msvc", "name": "Windows" },
|
|
]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.x"
|
|
- run: pip install PyGithub
|
|
- run: sudo apt-get install musl-tools
|
|
if: matrix.target.os == 'ubuntu-latest'
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
- run: rustup target add ${{ matrix.target.rust-target }}
|
|
- name: build b3sum
|
|
id: build_b3sum
|
|
run: python -u .github/workflows/build_b3sum.py ${{ matrix.target.rust-target }}
|
|
- name: upload release asset
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_TAG: ${{ github.ref }}
|
|
run: python -u .github/workflows/upload_github_release_asset.py ${{ steps.build_b3sum.outputs.bin_path }}
|