Skip to content

Commit

Permalink
Ci/use template (tracel-ai#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard authored Nov 20, 2022
1 parent cd39a1c commit 03b216a
Show file tree
Hide file tree
Showing 10 changed files with 215 additions and 271 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
workflow_call:
inputs:
crate:
required: true
type: string
secrets:
CRATES_IO_API_TOKEN:
required: true

jobs:
publish-crate:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: publish to crates.io
run: ./ci/publish.sh ${{ inputs.crate }}
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}


116 changes: 41 additions & 75 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,83 +6,49 @@ on:
- '*'

jobs:
publish-burn-tensor:
name: publish-burn-tensor
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
components: rustfmt
override: true

- name: publish burn-tensor to crates.io
run: ./ci/publish.sh burn-tensor
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}

publish-burn-dataset:
name: publish-burn-dataset
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
components: rustfmt
override: true

- name: publish burn-dataset to crates.io
run: ./ci/publish.sh burn-dataset
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
with:
crate: burn-dataset
secrets: inherit

publish-burn-derive:
name: publish-burn-derive
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
publish-burn-tensor-testgen:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
with:
crate: burn-tensor-testgen
secrets: inherit

- name: install rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
components: rustfmt
override: true

- name: publish burn-derive to crates.io
run: ./ci/publish.sh burn-derive
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}

publish-burn:
publish-burn-tensor:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
needs: publish-burn-tensor-testgen
with:
crate: burn-tensor
secrets: inherit

publish-burn-autodiff:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
needs: publish-burn-tensor
name: publish-burn
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2

- name: install rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: beta
components: rustfmt
override: true
with:
crate: burn-autodiff
secrets: inherit

publish-burn-tch:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
needs: publish-burn-autodiff
with:
crate: burn-tch
secrets: inherit

publish-burn-ndarray:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
needs: publish-burn-autodiff
with:
crate: burn-ndarray
secrets: inherit

- name: publish burn to crates.io
run: ./ci/publish.sh burn
env:
CRATES_IO_API_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
publish-burn:
uses: burn-rs/burn/.github/workflows/publish-template.yml@main
needs: publish-burn-ndarray
with:
crate: burn
secrets: inherit
38 changes: 0 additions & 38 deletions .github/workflows/test-burn-dataset.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-burn-ndarray.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-burn-tch.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/test-burn-tensor.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/test-burn.yml

This file was deleted.

Loading

0 comments on commit 03b216a

Please sign in to comment.