Fix a nasty race condition. #9
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: Release | |
# Do this on every tagged commit | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
build-linux-release: | |
name: Build release for Linux | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# - name: Install CUDA | |
# run: | | |
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb | |
# sudo dpkg -i cuda-keyring_1.0-1_all.deb | |
# sudo apt -y update | |
# sudo apt -y install cuda --no-install-recommends | |
# - name: Check semver | |
# uses: obi1kenobi/cargo-semver-checks-action@v2 | |
# env: | |
# NVCC: /usr/local/cuda/bin/nvcc | |
- name: Build hyperbeam | |
uses: docker://quay.io/pypa/manylinux_2_28_x86_64:latest | |
with: | |
entrypoint: /bin/bash | |
args: .github/workflows/build.sh | |
- name: Upload tarball | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux.tar.gz | |
path: "*.tar.gz" | |
if-no-files-found: error | |
build-macos-release: | |
name: Build release for MacOS | |
runs-on: macos-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Add Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
architecture: "x64" | |
- name: Add Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
architecture: "x64" | |
- name: Add Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
architecture: "x64" | |
- name: Add Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
architecture: "x64" | |
- name: Add Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
architecture: "x64" | |
- name: Build hyperbeam | |
run: .github/workflows/build.sh | |
- name: Upload tarball | |
uses: actions/upload-artifact@v2 | |
with: | |
name: macos.tar.gz | |
path: "*.tar.gz" | |
if-no-files-found: error | |
create-release: | |
name: Create a new release | |
runs-on: ubuntu-latest | |
needs: [build-linux-release, build-macos-release] | |
steps: | |
- name: Download Linux artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: linux.tar.gz | |
- name: Download MacOS artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: macos.tar.gz | |
- name: Provide new release asset | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
*.tar.gz |