|
1 | | -name: Prepare source distributions and wheels |
| 1 | +name: Release |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
12 | 12 | - '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+' |
13 | 13 | pull_request: |
14 | 14 | paths: |
15 | | - - '.github/workflows/dist.yml' |
| 15 | + - '.github/workflows/release.yml' |
16 | 16 | workflow_dispatch: |
17 | 17 | # Allow to run manually |
18 | 18 |
|
19 | 19 | jobs: |
20 | 20 |
|
21 | | - release_dist: |
22 | | - |
23 | | - # This job first checks whether "configure --enable-download-from-upstream-url" |
24 | | - # (the default since #32390) is needed. |
25 | | - # |
26 | | - # In this way, we check that all necessary package tarballs |
27 | | - # have already been uploaded to the Sage server at the time |
28 | | - # of pushing a release tag. |
29 | | - # |
30 | | - # It also uses "bootstrap -D", thus checking that the "configure" |
31 | | - # tarball has been uploaded to the Sage server at the time |
32 | | - # of pushing a release tag. |
33 | | - |
| 21 | + package_tarballs: |
34 | 22 | runs-on: ubuntu-latest |
35 | 23 | steps: |
36 | 24 | - uses: actions/checkout@v4 |
37 | 25 | - name: Install bootstrap prerequisites |
38 | 26 | run: | |
39 | 27 | sudo DEBIAN_FRONTEND=noninteractive apt-get update |
40 | 28 | sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap _prereq) |
41 | | - - name: make dist (--disable-download-from-upstream-url) |
42 | | - id: make_dist |
43 | | - run: | |
44 | | - ./bootstrap -D && ./configure --disable-download-from-upstream-url && make dist |
45 | | - env: |
46 | | - MAKE: make -j8 |
47 | | - - name: make download (--disable-download-from-upstream-url) |
48 | | - id: make_download |
49 | | - run: | |
50 | | - make -k download DOWNLOAD_PACKAGES=":all: --no-file huge" |
51 | | - env: |
52 | | - MAKE: make -j8 |
53 | | - - name: Reconfigure with --enable-download-from-upstream-url |
54 | | - if: (success() || failure()) && (steps.make_dist.outcome != 'success' || steps.make_download.outcome != 'success') |
| 29 | +
|
| 30 | + - name: Configure |
55 | 31 | run: | |
| 32 | + ./bootstrap |
56 | 33 | ./configure |
57 | | - - name: make dist (--enable-download-from-upstream-url) |
58 | | - if: (success() || failure()) && steps.make_dist.outcome != 'success' |
| 34 | +
|
| 35 | + - name: make dist |
59 | 36 | run: | |
60 | 37 | make dist |
61 | 38 | env: |
62 | 39 | MAKE: make -j8 |
63 | | - - name: make download (--enable-download-from-upstream-url) |
64 | | - if: (success() || failure()) && steps.make_download.outcome != 'success' |
| 40 | + |
| 41 | + - name: make download |
65 | 42 | run: | |
66 | 43 | make -k download DOWNLOAD_PACKAGES=":all: --no-file huge --allow-upstream" |
67 | 44 | env: |
68 | 45 | MAKE: make -j8 |
| 46 | + |
69 | 47 | - name: Remove what cannot be distributed |
70 | | - if: success() || failure() |
71 | 48 | run: | |
72 | 49 | rm -f upstream/*do-not-distribute* |
| 50 | +
|
| 51 | + - name: List files |
| 52 | + run: | |
| 53 | + ls -l dist |
| 54 | + ls -l upstream |
| 55 | +
|
73 | 56 | - uses: actions/upload-artifact@v4 |
74 | | - if: success() || failure() |
75 | 57 | with: |
76 | 58 | path: | |
77 | 59 | dist/*.tar.gz |
78 | 60 | upstream |
79 | | - name: release_dist |
| 61 | + name: package_tarballs |
80 | 62 |
|
81 | 63 | sdists: |
82 | 64 |
|
@@ -118,15 +100,15 @@ jobs: |
118 | 100 | if: env.CAN_DEPLOY == 'true' |
119 | 101 |
|
120 | 102 | release: |
121 | | - needs: [release_dist, sdists] |
| 103 | + needs: [package_tarballs, sdists] |
122 | 104 | runs-on: ubuntu-latest |
123 | 105 | if: github.ref_type == 'tag' |
124 | 106 | permissions: |
125 | 107 | contents: write |
126 | 108 | steps: |
127 | 109 | - uses: actions/download-artifact@v4 |
128 | 110 | with: |
129 | | - name: release_dist |
| 111 | + name: package_tarballs |
130 | 112 |
|
131 | 113 | - uses: actions/download-artifact@v4 |
132 | 114 | with: |
|
0 commit comments