Changeset 0c72bd in git


Ignore:
Timestamp:
Mar 12, 2021, 8:28:54 PM (3 years ago)
Author:
Matthias Koeppe <mkoeppe@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e8b3aec485e98942b3d941dda954621000368a5a
Parents:
5598f5b3a59a00339cefa7a50bd9d845ae30f8e9
Message:
.github/workflows/ci-sage.yml: Run a quick test job before testing lots of platforms in parallel
File:
1 edited

Legend:

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

    r5598f5b r0c72bd  
    8989          name: upstream
    9090
     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        if: env.SAGE_REPO != ''
     116      - name: Check out git-trac-command
     117        uses: actions/checkout@v2
     118        with:
     119          repository: sagemath/git-trac-command
     120          path: git-trac-command
     121        if: env.SAGE_TRAC_GIT != ''
     122      - name: Check out SageMath from trac.sagemath.org
     123        shell: bash {0}
     124        run: |
     125          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
     126        if: env.SAGE_TRAC_GIT != ''
     127      - uses: actions/download-artifact@v2
     128        with:
     129          path: upstream
     130          name: upstream
     131      - name: Install test prerequisites
     132        run: |
     133          sudo DEBIAN_FRONTEND=noninteractive apt-get update
     134          sudo DEBIAN_FRONTEND=noninteractive apt-get install tox python3-setuptools
     135      - name: Update Sage packages from upstream artifact
     136        run: |
     137          (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)
     138      - name: Configure and build Sage distribution within a Docker container
     139        run: |
     140          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::|;"
     141      - name: Copy logs from the Docker image or build container
     142        run: |
     143          mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"
     144          cp -r .tox/$TOX_ENV/Dockerfile .tox/$TOX_ENV/log "artifacts/$LOGS_ARTIFACT_NAME"
     145          if [ -f .tox/$TOX_ENV/Dockertags ]; then CONTAINERS=$(docker create $(tail -1 .tox/$TOX_ENV/Dockertags) /bin/bash || true); fi
     146          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
     147        if: always()
     148      - uses: actions/upload-artifact@v2
     149        with:
     150          path: artifacts
     151          name: ${{ env.LOGS_ARTIFACT_NAME }}
     152        if: always()
     153      - name: Print out logs for immediate inspection
     154        # and markup the output with GitHub Actions logging commands
     155        run: |
     156          .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
     157        if: always()
     158      - name: Push Docker images
     159        run: |
     160          if [ -f .tox/$TOX_ENV/Dockertags ]; then
     161            TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
     162            if [ -z "$TOKEN" ]; then
     163              TOKEN="${{ secrets.GITHUB_TOKEN }}"
     164            fi
     165            echo "$TOKEN" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
     166            for a in $(cat .tox/$TOX_ENV/Dockertags); do
     167              FULL_TAG=docker.pkg.github.com/$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')/$a
     168              docker tag $a $FULL_TAG
     169              echo Pushing $FULL_TAG
     170              docker push $FULL_TAG
     171            done || echo "(Ignoring errors)"
     172          fi
     173        if: always()
     174
    91175  cygwin:
    92176    env:
     
    105189    runs-on: windows-latest
    106190
    107     needs: [dist]
     191    needs: [dist, kanarienvogel]
    108192
    109193    strategy:
     
    188272  docker:
    189273    runs-on: ubuntu-latest
    190     needs: [dist]
     274    needs: [dist, kanarienvogel]
    191275    strategy:
    192276      fail-fast: false
     
    277361        xcode_version_factor: [11.7, default, 12.3]
    278362
    279     needs: [dist]
     363    needs: [dist, kanarienvogel]
    280364
    281365    env:
Note: See TracChangeset for help on using the changeset viewer.