-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yml.patch
104 lines (97 loc) · 3.35 KB
/
build.yml.patch
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
--- a/.github/workflows/build.yml 2024-12-22 20:43:53.742261013 -0500
+++ b/.github/workflows/build.yml 2024-12-22 20:45:37.868820580 -0500
@@ -9,20 +9,9 @@
required: false
default: true
push:
- branches-ignore:
- - "update-dependencies-pr"
- paths:
- - ".github/workflows/build.yml"
- - "docker/**"
- - "tests/**"
- - "*.sh"
+ branches: [master]
pull_request:
- paths:
- - ".github/workflows/build.yml"
- - "docker/**"
- - "tests/**"
- - "*.sh"
-
+ branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
@@ -36,7 +25,6 @@
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- - uses: pre-commit/[email protected]
build_manylinux:
needs: [pre_commit]
@@ -44,6 +32,9 @@
runs-on: ubuntu-22.04
permissions:
actions: write # this permission is needed to delete cache
+ packages: write
+ contents: read
+
strategy:
fail-fast: false
matrix:
@@ -64,6 +55,12 @@
uses: actions/checkout@v4
with:
fetch-depth: 50
+ submodules: true
+
+ - name: Patch
+ run: |
+ ./patch.sh
+ echo "COMMIT_SHA=$(git rev-parse HEAD:manylinux)" >> $GITHUB_ENV
- name: Set up emulation
if: matrix.platform != 'i686' && matrix.platform != 'x86_64'
@@ -78,33 +75,38 @@
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
uses: actions/cache/restore@v4
with:
- path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
+ path: manylinux/.buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
- name: Build
- run: ./build.sh
+ run: |
+ cd manylinux
+ ./build.sh
- name: Delete cache
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
KEY="buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}"
gh cache delete ${KEY} || true
+
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save cache
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
- path: .buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
+ path: manylinux/.buildx-cache-${{ matrix.policy }}_${{ matrix.platform }}/*
key: buildx-cache-${{ matrix.policy }}-${{ matrix.platform }}
- name: Deploy
- if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'pypa/manylinux'
- run: ./deploy.sh
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'karellen/karellen-manylinux'
+ run: |
+ cd manylinux
+ ./deploy.sh
+
env:
- QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
- QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
all_passed:
needs: [build_manylinux]