.github/workflows/release-c-xla.yml #12
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
on: | |
workflow_dispatch: | |
push: | |
branches: master | |
paths: | |
- 'spidr/backend/VERSION' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create-release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read C XLA version | |
run: echo "C_XLA_VERSION=$(cat spidr/backend/VERSION)" >> $GITHUB_ENV | |
- name: Create C XLA release | |
id: create-release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: c-xla-v${{ env.C_XLA_VERSION }} | |
release_name: C XLA release ${{ env.C_XLA_VERSION }} | |
body: "C XLA release ${{ env.C_XLA_VERSION }}" | |
c-xla: | |
needs: create-release | |
runs-on: ubuntu-latest | |
container: tensorflow/build:latest-python3.9 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build C XLA lib | |
run: ./spidr/backend/build.sh | |
- name: Publish C XLA lib | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.upload_url }} | |
asset_path: libc_xla-linux.so | |
asset_name: libc_xla-linux.so | |
asset_content_type: application/x-sharedlib |