Changeset 13931d in git for .github


Ignore:
Timestamp:
Mar 13, 2021, 7:33:52 PM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
788c7d976b09f5bb61097be13ea21e24ea41e63ec833c00ba9e6eeaf106499a582ea5cd694a3cf45
Parents:
b6d72d85fb5cc2c848447e5dbbf591fa7ddf09ea28cbc63cb35ee9b06f34563f9cb9380ae69dd83c
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-03-13 19:33:52+01:00
git-committer:
GitHub <noreply@github.com>2021-03-13 19:33:52+01:00
Message:
Merge pull request #1063 from mkoeppe/ci-sage-reduce-jobs

CI sage: reduce jobs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • .github/workflows/ci-sage.yml

    rb6d72d r13931d  
    5353  # Sage distribution packages to build
    5454  TARGETS_PRE: build/make/Makefile
    55   TARGETS:     SAGE_CHECK=yes singular pynac
    56   TARGETS_OPTIONAL: SAGE_CHECK=warn pysingular
     55  TARGETS:     SAGE_CHECK=no SAGE_CHECK_PACKAGES=singular,pynac singular pynac
     56  TARGETS_OPTIONAL: SAGE_CHECK=no SAGE_CHECK_pysingular=warn pysingular
    5757  # Standard setting: Test the current beta release of Sage:
    5858  SAGE_REPO:   sagemath/sage
    5959  SAGE_REF:    develop
    60   # Temporarily test on the branch from sage ticket for singular 4.2 upgrade
    61   SAGE_TRAC_GIT: git://trac.sagemath.org/sage.git
    62   SAGE_TRAC_COMMAND: try
     60  # Temporarily test with the branch from sage ticket for singular 4.2 upgrade
     61  # (this is a no-op after that ticket is merged)
     62  SAGE_TRAC_GIT: https://github.com/sagemath/sagetrac-mirror.git
    6363  SAGE_TICKET: 25993
    6464  REMOVE_PATCHES: "*"
     
    8888          path: upstream
    8989          name: upstream
     90
     91  kanarienvogel:
     92    # Quick run for 1 platform first; do not run the other platforms when this already fails
     93    runs-on: ubuntu-latest
     94    needs: [dist]
     95    strategy:
     96      fail-fast: true
     97      max-parallel: 4
     98      matrix:
     99        tox_system_factor: [ubuntu-focal]
     100        tox_packages_factor: [standard]
     101    env:
     102      # Override so that this runs faster
     103      TARGETS: SAGE_CHECK=no singular
     104      TARGETS_OPTIONAL: build/make/Makefile
     105    # The rest of this is identical to job "docker":
     106      TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
     107      LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
     108      DOCKER_TARGETS: configured with-targets with-targets-optional
     109    steps:
     110      - name: Check out SageMath
     111        uses: actions/checkout@v2
     112        with:
     113          repository: ${{ env.SAGE_REPO }}
     114          ref: ${{ env.SAGE_REF }}
     115          fetch-depth: 2000
     116        if: env.SAGE_REPO != ''
     117      - name: Check out git-trac-command
     118        uses: actions/checkout@v2
     119        with:
     120          repository: sagemath/git-trac-command
     121          path: git-trac-command
     122        if: env.SAGE_TRAC_GIT != ''
     123      - name: Check out SageMath from trac.sagemath.org
     124        shell: bash {0}
     125        run: |
     126          git config --global user.email "ci-sage@example.com"
     127          git config --global user.name "ci-sage workflow"
     128          if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
     129        if: env.SAGE_TRAC_GIT != ''
     130      - uses: actions/download-artifact@v2
     131        with:
     132          path: upstream
     133          name: upstream
     134      - name: Install test prerequisites
     135        run: |
     136          sudo DEBIAN_FRONTEND=noninteractive apt-get update
     137          sudo DEBIAN_FRONTEND=noninteractive apt-get install tox python3-setuptools
     138      - name: Update Sage packages from upstream artifact
     139        run: |
     140          (export PATH=$(pwd)/build/bin:$PATH; (cd upstream && bash -x update-pkgs.sh) && sed -i.bak '/upstream/d' .dockerignore && echo "/:toolchain:/i ADD upstream upstream" | sed -i.bak -f - build/bin/write-dockerfile.sh && git diff)
     141      - name: Configure and build Sage distribution within a Docker container
     142        run: |
     143          set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;"
     144      - name: Copy logs from the Docker image or build container
     145        run: |
     146          mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
     147          cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
     148          if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
     149          if [ -n "$CONTAINERS" ]; then for CONTAINER in $CONTAINERS; do for ARTIFACT in /sage/logs; do docker cp $CONTAINER:$ARTIFACT artifacts/$LOGS_ARTIFACT_NAME && HAVE_LOG=1; done; if [ -n "$HAVE_LOG" ]; then break; fi; done; fi
     150        if: always()
     151      - uses: actions/upload-artifact@v2
     152        with:
     153          path: artifacts
     154          name: ${{ env.LOGS_ARTIFACT_NAME }}
     155        if: always()
     156      - name: Print out logs for immediate inspection
     157        # and markup the output with GitHub Actions logging commands
     158        run: |
     159          .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
     160        if: always()
     161      - name: Push Docker images
     162        run: |
     163          if [ -f .tox/$TOX_ENV/Dockertags ]; then
     164            TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
     165            if [ -z "$TOKEN" ]; then
     166              TOKEN="${{ secrets.GITHUB_TOKEN }}"
     167            fi
     168            echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
     169            for a in $(cat .tox/$TOX_ENV/Dockertags); do
     170              FULL_TAG=docker.pkg.github.com/$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')/$a
     171              docker tag $a $FULL_TAG
     172              echo Pushing $FULL_TAG
     173              docker push $FULL_TAG
     174            done || echo "(Ignoring errors)"
     175          fi
     176        if: always()
    90177
    91178  cygwin:
     
    105192    runs-on: windows-latest
    106193
    107     needs: [dist]
     194    needs: [dist, kanarienvogel]
    108195
    109196    strategy:
     
    125212        repository: ${{ env.SAGE_REPO }}
    126213        ref: ${{ env.SAGE_REF }}
     214        fetch-depth: 2000
    127215      if: env.SAGE_REPO != ''
    128216    - name: Check out git-trac-command
     
    136224      # Random sleep and retry to limit the load on trac.sagemath.org
    137225      run: |
    138         if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac ${{ env.SAGE_TRAC_COMMAND }} $SAGE_TICKET; then exit 0; fi; sleep 40; done; exit 1
     226        git config --global user.email "ci-sage@example.com"
     227        git config --global user.name "ci-sage workflow"
     228        if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
    139229      if: env.SAGE_TRAC_GIT != ''
    140230    - uses: actions/download-artifact@v2
     
    188278  docker:
    189279    runs-on: ubuntu-latest
    190     needs: [dist]
     280    needs: [dist, kanarienvogel]
    191281    strategy:
    192282      fail-fast: false
     
    205295          repository: ${{ env.SAGE_REPO }}
    206296          ref: ${{ env.SAGE_REF }}
     297          fetch-depth: 2000
    207298        if: env.SAGE_REPO != ''
    208299      - name: Check out git-trac-command
     
    215306        shell: bash {0}
    216307        run: |
    217           if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac ${{ env.SAGE_TRAC_COMMAND }} $SAGE_TICKET; then exit 0; fi; sleep 40; done; exit 1
     308          git config --global user.email "ci-sage@example.com"
     309          git config --global user.name "ci-sage workflow"
     310          if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
    218311        if: env.SAGE_TRAC_GIT != ''
    219312      - uses: actions/download-artifact@v2
     
    273366      matrix:
    274367        os: [ macos-10.15, macos-11.0 ]
    275         tox_system_factor: [homebrew-macos, homebrew-macos-python3_xcode, homebrew-macos-python3_xcode-nokegonly, conda-forge-macos]
     368        tox_system_factor: [homebrew-macos, conda-forge-macos]
    276369        tox_packages_factor: [minimal, standard]
    277         xcode_version_factor: [11.7, default, 12.3]
    278 
    279     needs: [dist]
     370        xcode_version_factor: [11.7, default]
     371
     372    needs: [dist, kanarienvogel]
    280373
    281374    env:
     
    294387          repository: ${{ env.SAGE_REPO }}
    295388          ref: ${{ env.SAGE_REF }}
     389          fetch-depth: 2000
    296390        if: env.SAGE_REPO != ''
    297391      - name: Check out git-trac-command
     
    304398        shell: bash {0}
    305399        run: |
    306           if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac ${{ env.SAGE_TRAC_COMMAND }} $SAGE_TICKET; then exit 0; fi; sleep 40; done; exit 1
     400          git config --global user.email "ci-sage@example.com"
     401          git config --global user.name "ci-sage workflow"
     402          if [ ! -d .git ]; then git init; fi; git remote add trac ${{ env.SAGE_TRAC_GIT }} && x=1 && while [ $x -le 5 ]; do x=$(( $x + 1 )); sleep $(( $RANDOM % 60 + 1 )); if git-trac-command/git-trac fetch $SAGE_TICKET; then git merge FETCH_HEAD || echo "(ignored)"; exit 0; fi; sleep 40; done; exit 1
    307403        if: env.SAGE_TRAC_GIT != ''
    308404      - uses: actions/download-artifact@v2
Note: See TracChangeset for help on using the changeset viewer.