Release #8
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-18.04 | |
strategy: | |
matrix: | |
python-version: ['3.7.1', '3.8.0', '3.9.0', '3.10.0'] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
sudo apt update -y | |
sudo apt install -y \ | |
tzdata \ | |
build-essential \ | |
pkg-config \ | |
cmake \ | |
curl \ | |
git \ | |
; | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install CUDA | |
uses: Jimver/cuda-toolkit@v0.2.5 | |
with: | |
cuda: '11.2.0' | |
- name: Build and Tar | |
run: ./.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 | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Build and Tar | |
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 |