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

Commit eeadb9d

Browse files
author
Matthias Koeppe
committed
.github/workflows/ci-cygwin.yml: Test more optional packages
1 parent 784abe8 commit eeadb9d

File tree

1 file changed

+81
-1
lines changed

1 file changed

+81
-1
lines changed

.github/workflows/ci-cygwin.yml

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ jobs:
482482
env:
483483
STAGE: iv-b
484484
PREVIOUS_STAGES: iii
485-
TARGETS: pynormaliz topcom lrslib latte_int cryptominisat
485+
TARGETS: 4ti2 pynormaliz topcom lrslib latte_int cryptominisat
486486
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
487487
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
488488

@@ -637,3 +637,83 @@ jobs:
637637
path: sage-local-${{ env.STAGE }}.tar
638638
name: ${{ env.LOCAL_ARTIFACT_NAME }}
639639
if: always()
640+
641+
cygwin-stage-iv-d:
642+
env:
643+
STAGE: iv-d
644+
PREVIOUS_STAGES: iii
645+
TARGETS: 4ti2 pynormaliz qepcad lrslib latte_int topcom barvinok isl qhull sage_numerical_backends_coin primecount plantri polymake jupymake kenzo libsemigroups mcqd meataxe mpfrcx openssl p_group_cohomology rst2ipynb sirocco tdlib tides
646+
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
647+
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }}
648+
649+
needs: [cygwin-stage-iii]
650+
651+
runs-on: windows-latest
652+
653+
strategy:
654+
fail-fast: false
655+
matrix:
656+
pkgs: [minimal, standard, standard-python2]
657+
steps:
658+
- run: |
659+
git config --global core.autocrlf false
660+
git config --global core.symlinks true
661+
- uses: actions/checkout@v1
662+
- name: install cygwin and minimal prerequisites with choco
663+
shell: bash {0}
664+
run: |
665+
choco --version
666+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/cygwin.txt ./build/pkgs/cygwin-bootstrap.txt)
667+
choco install $PACKAGES --source cygwin
668+
- name: bootstrap
669+
run: |
670+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && env && ./bootstrap'
671+
- name: install additional cygwin packages with choco
672+
if: contains(matrix.pkgs, 'standard')
673+
shell: bash {0}
674+
run: |
675+
PACKAGES=$(sed 's/#.*//;' ./build/pkgs/*/distros/cygwin.txt)
676+
choco install $PACKAGES --source cygwin
677+
- uses: actions/download-artifact@v2-preview
678+
with:
679+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
680+
- name: Extract sage-local artifact
681+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
682+
# We set the installation records to the same mtime so that no rebuilds due to dependencies
683+
# among these packages are triggered.
684+
run: |
685+
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'
686+
- name: configure
687+
run: |
688+
C:\\tools\\cygwin\\bin\\bash -l -c 'export PATH=/usr/local/bin:/usr/bin && cd $(cygpath -u "$GITHUB_WORKSPACE") && ./configure $CONFIGURE_ARGS'
689+
- name: make
690+
run: |
691+
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 $TARGETS'
692+
- name: Prepare logs artifact
693+
shell: bash
694+
run: |
695+
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"
696+
if: always()
697+
- uses: actions/upload-artifact@v2-preview
698+
with:
699+
path: artifacts
700+
name: ${{ env.LOGS_ARTIFACT_NAME }}
701+
if: always()
702+
- name: Print out logs for immediate inspection
703+
# The markup in the output is a GitHub Actions logging command
704+
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions
705+
shell: bash
706+
run: |
707+
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' \;
708+
if: always()
709+
- name: Prepare sage-local artifact
710+
# We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
711+
# We remove the local/lib64 link, which will be recreated by the next stage.
712+
run: |
713+
C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f local/lib64; tar -cf sage-local-${{ env.STAGE }}.tar local'
714+
if: always()
715+
- uses: actions/upload-artifact@v2-preview
716+
with:
717+
path: sage-local-${{ env.STAGE }}.tar
718+
name: ${{ env.LOCAL_ARTIFACT_NAME }}
719+
if: always()

0 commit comments

Comments
 (0)