-
Notifications
You must be signed in to change notification settings - Fork 35
83 lines (69 loc) · 2.36 KB
/
build-nightly-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build nightly Catalyst releases for TestPyPI
on:
schedule:
# Run every weekday at 23:40 EDT (cron is in UTC)
- cron: "40 3 * * 2-6"
workflow_dispatch:
jobs:
setup:
name: Setup the release
runs-on: ubuntu-latest
steps:
- name: Checkout Catalyst repo
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.NIGHTLY_VERSION_UPDATE_DEPLOY_KEY }}
- name: Bump dev version
run: |
python $GITHUB_WORKSPACE/.github/workflows/set_nightly_version.py
- name: Push new version
run: |
git config --global user.email '${{ secrets.AUTO_UPDATE_VERSION_RINGO_EMAIL }}'
git config --global user.name "ringo-but-quantum"
git add $GITHUB_WORKSPACE/frontend/catalyst/_version.py
git commit -m "[no ci] bump nightly version"
git push
# Only build the most popular configurations on a nightly schedule to save PyPI storage.
linux-x86:
name: Build on Linux x86-64
needs: [setup]
uses: ./.github/workflows/build-wheel-linux-x86_64.yaml
# linux-aarch:
# name: Build on Linux aarch64
# needs: [setup]
# uses: ./.github/workflows/build-wheel-linux-arm64.yaml
macos-arm:
name: Build on macOS arm64
needs: [setup]
uses: ./.github/workflows/build-wheel-macos-arm64.yaml
# macos-x86:
# name: Build on macOS x86-64
# needs: [setup]
# uses: ./.github/workflows/build-wheel-macos-x86_64.yaml
upload:
name: Prepare & Upload wheels to TestPyPI
needs: [linux-x86, linux-aarch, macos-arm, macos-x86]
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: Install rename
run: |
sudo apt install rename
- name: Prepare wheels
run: |
rename "s/linux/manylinux_2_28/" dist/PennyLane_Catalyst-*
rename "s/macosx_14/macosx_13/" dist/PennyLane_Catalyst-*
rename "s/_universal2/_x86_64/" dist/PennyLane_Catalyst-*
# Discard the 3.9 wheels to save space on nightly builds.
rm dist/PennyLane_Catalyst-*-cp39-cp39-*
- name: Upload wheels
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: dist