Skip to content

Do not recompute checksums before release if already computed #38

Do not recompute checksums before release if already computed

Do not recompute checksums before release if already computed #38

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
create_draft_release:
if: github.ref_type == 'tag'
permissions:
contents: write
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Create draft release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! gh release list | grep -q ${{ github.ref_name }}; then
gh release create --title ${{ github.ref_name }} --draft ${{ github.ref_name }}
fi
linux:
name: "x86_64-linux-gnu-{cpu,tpu}"
needs: [create_draft_release]
# We intentionally build on ubuntu 20 to compile against
# an older version of glibc
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: "24"
elixir-version: "1.15.8"
# Setup the compilation environment
- uses: abhinavsingh/setup-bazel@v3
with:
version: "6.5.0"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: python -m pip install --upgrade pip numpy
# Build and upload the archives
- run: mix deps.get
- run: .github/scripts/compile_and_upload.sh ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XLA_TARGET: cpu
CC: gcc-9
- run: .github/scripts/compile_and_upload.sh ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XLA_TARGET: tpu
CC: gcc-9
macos:
name: "x86_64-darwin-cpu"
needs: [create_draft_release]
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- run: brew install elixir
- run: mix local.hex --force
# Setup the compilation environment
- uses: abhinavsingh/setup-bazel@v3
with:
version: "6.5.0"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: python -m pip install --upgrade pip numpy
# Build and upload the archive
- run: mix deps.get
- run: .github/scripts/compile_and_upload.sh ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XLA_TARGET: cpu
CC: gcc-9
macos_arm:
name: "aarch64-darwin-cpu (cross-compiled)"
needs: [create_draft_release]
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- run: brew install elixir
- run: mix local.hex --force
# Setup the compilation environment
- uses: abhinavsingh/setup-bazel@v3
with:
version: "6.5.0"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: python -m pip install --upgrade pip numpy
# Build and upload the archive
- run: mix deps.get
- run: .github/scripts/compile_and_upload.sh ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XLA_TARGET: cpu
XLA_TARGET_PLATFORM: "aarch64-darwin"
# Explicitly cross-compile for arm64
BUILD_FLAGS: "--config=macos_arm64"
CC: gcc-9