File tree Expand file tree Collapse file tree 3 files changed +70
-8
lines changed Expand file tree Collapse file tree 3 files changed +70
-8
lines changed Original file line number Diff line number Diff line change 11
11
export GIT_AUTHOR_EMAIL=
" [email protected] "
12
12
export GIT_COMMITTER_NAME=" $GIT_AUTHOR_NAME "
13
13
export GIT_COMMITTER_EMAIL=" $GIT_AUTHOR_EMAIL "
14
+ git tag -f test_base
14
15
git commit -q -m " Uncommitted changes" --no-allow-empty -a
15
16
for a in $PRs ; do
16
17
echo " ::group::Merging PR https://github.com/$REPO /pull/$a "
17
18
git tag -f test_head
18
19
$GH pr checkout -b pr-$a $a
19
20
git fetch --unshallow --all
20
21
git checkout -q test_head
21
- if git merge --no-edit -q pr-$a ; then
22
+ if git merge --no-edit --squash - q pr-$a ; then
22
23
echo " ::endgroup::"
24
+ git commit -q -m " Merge https://github.com/$REPO /pull/$a " -a --allow-empty
23
25
echo " Merged #$a "
24
26
else
25
27
echo " ::endgroup::"
26
28
echo " Failure merging #$a , resetting"
27
29
git reset --hard
28
30
fi
29
31
done
30
- git log test_head ..HEAD
32
+ git log test_base ..HEAD
31
33
fi
Original file line number Diff line number Diff line change @@ -24,19 +24,34 @@ concurrency:
24
24
cancel-in-progress : true
25
25
26
26
jobs :
27
- build :
27
+ get_ci_fixes :
28
28
runs-on : ubuntu-latest
29
- container : ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
30
29
steps :
31
30
- name : Checkout
32
31
id : checkout
33
32
uses : actions/checkout@v4
34
-
35
33
- name : Merge CI fixes from sagemath/sage
36
34
run : |
37
35
.ci/merge-fixes.sh
38
36
env :
39
37
GH_TOKEN : ${{ github.token }}
38
+ - name : Store CI fixes in upstream artifact
39
+ run : |
40
+ mkdir -p upstream
41
+ git format-patch --stdout test_base > upstream/ci_fixes.patch
42
+ - uses : actions/upload-artifact@v2
43
+ with :
44
+ path : upstream
45
+ name : upstream
46
+
47
+ build :
48
+ runs-on : ubuntu-latest
49
+ container : ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
50
+ needs : [get_ci_fixes]
51
+ steps :
52
+ - name : Checkout
53
+ id : checkout
54
+ uses : actions/checkout@v4
40
55
41
56
- name : Update system packages
42
57
id : prepare
74
89
if [ ! -f worktree-image/.gitignore ]; then cp .gitignore worktree-image/; fi
75
90
(cd worktree-image && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset --quiet old && git add -N . && git status)
76
91
92
+ - name : Download upstream artifact
93
+ uses : actions/download-artifact@v3
94
+ with :
95
+ path : upstream
96
+ name : upstream
97
+
98
+ - name : Apply CI fixes from sagemath/sage
99
+ # After applying the fixes, make sure all changes are marked as uncommitted changes.
100
+ run : |
101
+ if [ -r upstream/ci_fixes.patch ]; then
102
+ (cd worktree-image && git commit --quiet -m "current changes" --allow-empty -a && git am) < upstream/ci_fixes.patch
103
+ git reset --quiet old
104
+ git add -N .
105
+ fi
106
+
77
107
- name : Incremental build, test changed files (sage -t --new)
78
108
id : incremental
79
109
run : |
Original file line number Diff line number Diff line change @@ -12,18 +12,33 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- build-docs :
15
+ get_ci_fixes :
16
16
runs-on : ubuntu-latest
17
- container : ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets:dev
18
17
steps :
19
18
- name : Checkout
19
+ id : checkout
20
20
uses : actions/checkout@v4
21
-
22
21
- name : Merge CI fixes from sagemath/sage
23
22
run : |
24
23
.ci/merge-fixes.sh
25
24
env :
26
25
GH_TOKEN : ${{ github.token }}
26
+ - name : Store CI fixes in upstream artifact
27
+ run : |
28
+ mkdir -p upstream
29
+ git format-patch --stdout test_base > upstream/ci_fixes.patch
30
+ - uses : actions/upload-artifact@v2
31
+ with :
32
+ path : upstream
33
+ name : upstream
34
+
35
+ build-docs :
36
+ runs-on : ubuntu-latest
37
+ container : ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets:dev
38
+ needs : [get_ci_fixes]
39
+ steps :
40
+ - name : Checkout
41
+ uses : actions/checkout@v4
27
42
28
43
- name : Update system packages
29
44
run : |
60
75
# Keep track of changes to built HTML
61
76
new_version=$(cat src/VERSION.txt); (cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage '$new_version' /'; git init && (echo "*.svg binary"; echo "*.pdf binary") >> .gitattributes && (echo ".buildinfo"; echo '*.inv'; echo '.git*'; echo '*.svg'; echo '*.pdf'; echo '*.png'; echo 'searchindex.js') > .gitignore; git add -A && git commit --quiet -m "old")
62
77
78
+ - name : Download upstream artifact
79
+ uses : actions/download-artifact@v3
80
+ with :
81
+ path : upstream
82
+ name : upstream
83
+
84
+ - name : Apply CI fixes from sagemath/sage
85
+ # After applying the fixes, make sure all changes are marked as uncommitted changes.
86
+ run : |
87
+ if [ -r upstream/ci_fixes.patch ]; then
88
+ (cd worktree-image && git commit -m "current changes" --allow-empty -a && git am) < upstream/ci_fixes.patch
89
+ git reset --quiet old
90
+ git add -N .
91
+ fi
92
+
63
93
- name : Incremental build
64
94
id : incremental
65
95
run : |
You can’t perform that action at this time.
0 commit comments