Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 8406e25

Browse files
author
Matthias Koeppe
committed
Rebalance stages
1 parent f9700fd commit 8406e25

File tree

1 file changed

+251
-2
lines changed

1 file changed

+251
-2
lines changed

.github/workflows/ci-cygwin-standard.yml

Lines changed: 251 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ env:
1717
SAGE_FAT_BINARY: yes
1818

1919
jobs:
20+
21+
############################################## stage-i ##########################################
22+
2023
cygwin-stage-i-a:
2124
env:
2225
STAGE: i-a
@@ -158,6 +161,8 @@ jobs:
158161
name: ${{ env.LOCAL_ARTIFACT_NAME }}
159162
if: always()
160163

164+
############################################## stage-ii ##########################################
165+
161166
cygwin-stage-ii-a:
162167
env:
163168
STAGE: ii-a
@@ -319,7 +324,249 @@ jobs:
319324
path: sage-local-${{ env.STAGE }}.tar
320325
name: ${{ env.LOCAL_ARTIFACT_NAME }}
321326
if: always()
322-
327+
328+
cygwin-stage-ii-c:
329+
env:
330+
STAGE: ii-c
331+
PREVIOUS_STAGES: i-*
332+
TARGETS: m4rie cypari eclib lrcalc fpylll sage_brial linbox sympy pynac
333+
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
334+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
335+
336+
needs: [cygwin-stage-i-a, cygwin-stage-i-b]
337+
338+
runs-on: windows-latest
339+
340+
strategy:
341+
fail-fast: false
342+
matrix:
343+
pkgs: [standard]
344+
steps:
345+
- run: |
346+
git config --global core.autocrlf false
347+
git config --global core.symlinks true
348+
- uses: actions/checkout@v1
349+
- name: install cygwin and minimal prerequisites with choco
350+
shell: bash {0}
351+
run: |
352+
choco --version
353+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/cygwin.txt ./build/pkgs/cygwin-bootstrap.txt)
354+
choco install $PACKAGES --source cygwin
355+
- name: bootstrap
356+
run: |
357+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && env && ./bootstrap'
358+
- name: install additional cygwin packages with choco
359+
if: contains(matrix.pkgs, 'standard')
360+
shell: bash {0}
361+
run: |
362+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/*/distros/cygwin.txt)
363+
choco install $PACKAGES --source cygwin
364+
- uses: actions/download-artifact@v2-preview
365+
with:
366+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
367+
- name: Extract sage-local artifact
368+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
369+
# We set the installation records to the same mtime so that no rebuilds due to dependencies
370+
# among these packages are triggered.
371+
run: |
372+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ls -l sage-local-*.tar; for a in sage-local-${{ env.PREVIOUS_STAGES }}.tar; do echo Extracting $a; tar xf $a; done; (cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *); ls -l local local/var/lib/sage/installed/; src/bin/sage-rebase.sh local'
373+
- name: configure
374+
run: |
375+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure $CONFIGURE_ARGS'
376+
- name: make
377+
run: |
378+
C:\\tools\\cygwin\\bin\\bash -l -x -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && make -k -w V=0 base-toolchain && make -k -w V=0 $TARGETS'
379+
- name: Prepare logs artifact
380+
shell: bash
381+
run: |
382+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in local/var/tmp/sage/build/*; do if [ -d $a ]; then tar -c --remove-files -f "artifacts/$LOGS_ARTIFACT_NAME/$(basename $a).tar" $a; fi; done; cp -r logs/* "artifacts/$LOGS_ARTIFACT_NAME"
383+
if: always()
384+
- uses: actions/upload-artifact@v2-preview
385+
with:
386+
path: artifacts
387+
name: ${{ env.LOGS_ARTIFACT_NAME }}
388+
if: always()
389+
- name: Print out logs for immediate inspection
390+
# The markup in the output is a GitHub Actions logging command
391+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions
392+
shell: bash
393+
run: |
394+
find "artifacts/$LOGS_ARTIFACT_NAME" -type f -name "*.log" -exec sh -c 'if tail -20 "{}" 2>/dev/null | grep "^Error" >/dev/null; then echo :":"error file={}:":" ==== LOG FILE {} CONTAINS AN ERROR ====; cat {} ; fi' \;
395+
if: always()
396+
- name: Prepare sage-local artifact
397+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
398+
# We remove the local/lib64 link, which will be recreated by the next stage.
399+
run: |
400+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f local/lib64; tar -cf sage-local-${{ env.STAGE }}.tar local'
401+
if: always()
402+
- uses: actions/upload-artifact@v2-preview
403+
with:
404+
path: sage-local-${{ env.STAGE }}.tar
405+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
406+
if: always()
407+
408+
cygwin-stage-ii-d:
409+
env:
410+
STAGE: ii-d
411+
PREVIOUS_STAGES: i-*
412+
TARGETS: ipython jupyter-client ipywidgets notebook
413+
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
414+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
415+
416+
needs: [cygwin-stage-i-a, cygwin-stage-i-b]
417+
418+
runs-on: windows-latest
419+
420+
strategy:
421+
fail-fast: false
422+
matrix:
423+
pkgs: [standard]
424+
steps:
425+
- run: |
426+
git config --global core.autocrlf false
427+
git config --global core.symlinks true
428+
- uses: actions/checkout@v1
429+
- name: install cygwin and minimal prerequisites with choco
430+
shell: bash {0}
431+
run: |
432+
choco --version
433+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/cygwin.txt ./build/pkgs/cygwin-bootstrap.txt)
434+
choco install $PACKAGES --source cygwin
435+
- name: bootstrap
436+
run: |
437+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && env && ./bootstrap'
438+
- name: install additional cygwin packages with choco
439+
if: contains(matrix.pkgs, 'standard')
440+
shell: bash {0}
441+
run: |
442+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/*/distros/cygwin.txt)
443+
choco install $PACKAGES --source cygwin
444+
- uses: actions/download-artifact@v2-preview
445+
with:
446+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
447+
- name: Extract sage-local artifact
448+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
449+
# We set the installation records to the same mtime so that no rebuilds due to dependencies
450+
# among these packages are triggered.
451+
run: |
452+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ls -l sage-local-*.tar; for a in sage-local-${{ env.PREVIOUS_STAGES }}.tar; do echo Extracting $a; tar xf $a; done; (cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *); ls -l local local/var/lib/sage/installed/; src/bin/sage-rebase.sh local'
453+
- name: configure
454+
run: |
455+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure $CONFIGURE_ARGS'
456+
- name: make
457+
run: |
458+
C:\\tools\\cygwin\\bin\\bash -l -x -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && make -k -w V=0 base-toolchain && make -k -w V=0 $TARGETS'
459+
- name: Prepare logs artifact
460+
shell: bash
461+
run: |
462+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in local/var/tmp/sage/build/*; do if [ -d $a ]; then tar -c --remove-files -f "artifacts/$LOGS_ARTIFACT_NAME/$(basename $a).tar" $a; fi; done; cp -r logs/* "artifacts/$LOGS_ARTIFACT_NAME"
463+
if: always()
464+
- uses: actions/upload-artifact@v2-preview
465+
with:
466+
path: artifacts
467+
name: ${{ env.LOGS_ARTIFACT_NAME }}
468+
if: always()
469+
- name: Print out logs for immediate inspection
470+
# The markup in the output is a GitHub Actions logging command
471+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions
472+
shell: bash
473+
run: |
474+
find "artifacts/$LOGS_ARTIFACT_NAME" -type f -name "*.log" -exec sh -c 'if tail -20 "{}" 2>/dev/null | grep "^Error" >/dev/null; then echo :":"error file={}:":" ==== LOG FILE {} CONTAINS AN ERROR ====; cat {} ; fi' \;
475+
if: always()
476+
- name: Prepare sage-local artifact
477+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
478+
# We remove the local/lib64 link, which will be recreated by the next stage.
479+
run: |
480+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f local/lib64; tar -cf sage-local-${{ env.STAGE }}.tar local'
481+
if: always()
482+
- uses: actions/upload-artifact@v2-preview
483+
with:
484+
path: sage-local-${{ env.STAGE }}.tar
485+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
486+
if: always()
487+
488+
cygwin-stage-ii-e:
489+
env:
490+
STAGE: ii-e
491+
PREVIOUS_STAGES: i-*
492+
TARGETS: threejs tachyon pillow jmol
493+
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
494+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
495+
496+
needs: [cygwin-stage-i-a, cygwin-stage-i-b]
497+
498+
runs-on: windows-latest
499+
500+
strategy:
501+
fail-fast: false
502+
matrix:
503+
pkgs: [standard]
504+
steps:
505+
- run: |
506+
git config --global core.autocrlf false
507+
git config --global core.symlinks true
508+
- uses: actions/checkout@v1
509+
- name: install cygwin and minimal prerequisites with choco
510+
shell: bash {0}
511+
run: |
512+
choco --version
513+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/cygwin.txt ./build/pkgs/cygwin-bootstrap.txt)
514+
choco install $PACKAGES --source cygwin
515+
- name: bootstrap
516+
run: |
517+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && env && ./bootstrap'
518+
- name: install additional cygwin packages with choco
519+
if: contains(matrix.pkgs, 'standard')
520+
shell: bash {0}
521+
run: |
522+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/*/distros/cygwin.txt)
523+
choco install $PACKAGES --source cygwin
524+
- uses: actions/download-artifact@v2-preview
525+
with:
526+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
527+
- name: Extract sage-local artifact
528+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
529+
# We set the installation records to the same mtime so that no rebuilds due to dependencies
530+
# among these packages are triggered.
531+
run: |
532+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ls -l sage-local-*.tar; for a in sage-local-${{ env.PREVIOUS_STAGES }}.tar; do echo Extracting $a; tar xf $a; done; (cd local/var/lib/sage/installed/ && touch .dummy && touch --reference=.dummy *); ls -l local local/var/lib/sage/installed/; src/bin/sage-rebase.sh local'
533+
- name: configure
534+
run: |
535+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure $CONFIGURE_ARGS'
536+
- name: make
537+
run: |
538+
C:\\tools\\cygwin\\bin\\bash -l -x -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && make -k -w V=0 base-toolchain && make -k -w V=0 $TARGETS'
539+
- name: Prepare logs artifact
540+
shell: bash
541+
run: |
542+
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in local/var/tmp/sage/build/*; do if [ -d $a ]; then tar -c --remove-files -f "artifacts/$LOGS_ARTIFACT_NAME/$(basename $a).tar" $a; fi; done; cp -r logs/* "artifacts/$LOGS_ARTIFACT_NAME"
543+
if: always()
544+
- uses: actions/upload-artifact@v2-preview
545+
with:
546+
path: artifacts
547+
name: ${{ env.LOGS_ARTIFACT_NAME }}
548+
if: always()
549+
- name: Print out logs for immediate inspection
550+
# The markup in the output is a GitHub Actions logging command
551+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions
552+
shell: bash
553+
run: |
554+
find "artifacts/$LOGS_ARTIFACT_NAME" -type f -name "*.log" -exec sh -c 'if tail -20 "{}" 2>/dev/null | grep "^Error" >/dev/null; then echo :":"error file={}:":" ==== LOG FILE {} CONTAINS AN ERROR ====; cat {} ; fi' \;
555+
if: always()
556+
- name: Prepare sage-local artifact
557+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
558+
# We remove the local/lib64 link, which will be recreated by the next stage.
559+
run: |
560+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f local/lib64; tar -cf sage-local-${{ env.STAGE }}.tar local'
561+
if: always()
562+
- uses: actions/upload-artifact@v2-preview
563+
with:
564+
path: sage-local-${{ env.STAGE }}.tar
565+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
566+
if: always()
567+
568+
############################################## stage-iii ##########################################
569+
323570
cygwin-stage-iii:
324571
env:
325572
STAGE: iii
@@ -328,7 +575,7 @@ jobs:
328575
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
329576
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
330577

331-
needs: [cygwin-stage-ii-a, cygwin-stage-ii-b]
578+
needs: [cygwin-stage-ii-a, cygwin-stage-ii-b, cygwin-stage-ii-c, cygwin-stage-ii-d, cygwin-stage-ii-e]
332579

333580
runs-on: windows-latest
334581

@@ -400,6 +647,8 @@ jobs:
400647
name: ${{ env.LOCAL_ARTIFACT_NAME }}
401648
if: always()
402649

650+
############################################## stage-iv ##########################################
651+
403652
cygwin-stage-iv-a:
404653
env:
405654
STAGE: iv-a

0 commit comments

Comments
 (0)