diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..91c31923f2e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,35 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// /~https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/debian +{ + "name": "Conda", + "image": "mcr.microsoft.com/vscode/devcontainers/base:0-bullseye", + + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + + // Setup conda environment + "onCreateCommand": ".devcontainer/onCreate-conda.sh", + + // Install additional features. + "features": { + // For config options, see /~https://github.com/devcontainers/features/tree/main/src/conda + "ghcr.io/devcontainers/features/conda": { + "version": "latest", + "addCondaForge": "true" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "guyskk.language-cython", + "ms-python.isort", + "ms-toolsai.jupyter", + "ms-python.vscode-pylance", + "ms-python.pylint", + "ms-python.python", + "lextudio.restructuredtext", + "trond-snekvik.simple-rst" + ] + } + } +} diff --git a/.devcontainer/onCreate-conda.sh b/.devcontainer/onCreate-conda.sh new file mode 100755 index 00000000000..eaa045cd27b --- /dev/null +++ b/.devcontainer/onCreate-conda.sh @@ -0,0 +1,14 @@ +# Do not keep running on errors +set -e + +# Create conda environment +./bootstrap-conda +conda install mamba -n base -c conda-forge -y +mamba env create --file src/environment-dev.yml || mamba env update --file src/environment-dev.yml +conda init bash + +# Build sage +conda run -n sage-dev ./bootstrap +conda run -n sage-dev ./configure --with-python=/opt/conda/envs/sage-dev/bin/python --prefix=/opt/conda/envs/sage-dev +conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup +conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src diff --git a/.github/workflows/ci-cygwin-minimal.yml b/.github/workflows/ci-cygwin-minimal.yml deleted file mode 100644 index fa8f5db4f81..00000000000 --- a/.github/workflows/ci-cygwin-minimal.yml +++ /dev/null @@ -1,1042 +0,0 @@ -name: CI cygwin-minimal - -on: - push: - tags: - - '*' - workflow_dispatch: - # Allow to run manually - -env: - MAKE: make -j8 - SAGE_NUM_THREADS: 3 - CYGWIN: winsymlinks:native - EXTRA_CONFIGURE_ARGS: --enable-fat-binary - SAGE_LOCAL: /opt/sage-${{ github.sha }} - -jobs: - -############################################## stage-i ########################################## - - cygwin-stage-i-a: - env: - STAGE: i-a - # builds openblas - TARGETS: iml gsl - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --remove-files "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - # upload-artifact@v2 does not support whitespace in file names. - # so we tar up the directory ourselves - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-i-b: - env: - STAGE: i-b - TARGETS: cython setuptools_scm kiwisolver dateutil cycler pyparsing certifi pkgconfig pplpy - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --remove-files "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - # upload-artifact@v2 does not support whitespace in file names. - # so we tar up the directory ourselves - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - -############################################## stage-ii ########################################## - - cygwin-stage-ii-a: - env: - STAGE: ii-a - PREVIOUS_STAGES: i-* - TARGETS: cvxopt rpy2 - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-i-a, cygwin-stage-i-b] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - # upload-artifact@v2 does not support whitespace in file names. - # so we tar up the directory ourselves - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-ii-b: - env: - STAGE: ii-b - PREVIOUS_STAGES: i-* - TARGETS: singular maxima gap pari gfan palp flintqs arb ecm givaro - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-i-a, cygwin-stage-i-b] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-ii-c: - env: - STAGE: ii-c - PREVIOUS_STAGES: i-* - TARGETS: cypari eclib fplll linbox giac - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-i-a, cygwin-stage-i-b] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-ii-d: - env: - STAGE: ii-d - PREVIOUS_STAGES: i-* - TARGETS: ipython ipywidgets notebook - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-i-a, cygwin-stage-i-b] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-ii-e: - env: - STAGE: ii-e - PREVIOUS_STAGES: i-* - TARGETS: threejs tachyon pillow jmol m4rie sympy lrcalc lcalc symmetrica cliquer libbraiding planarity rw elliptic_curves combinatorial_designs sympow - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-i-a, cygwin-stage-i-b] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - -############################################## stage-iii ########################################## - - cygwin-stage-iii-a: - env: - STAGE: iii-a - PREVIOUS_STAGES: ii-* - TARGETS: sagelib - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-ii-a, cygwin-stage-ii-b, cygwin-stage-ii-c, cygwin-stage-ii-d, cygwin-stage-ii-e] - - runs-on: windows-latest - - continue-on-error: true - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - # upload-artifact@v2 does not support whitespace in file names. - # so we tar up the directory ourselves - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-iii-b: - env: - STAGE: iii-b - PREVIOUS_STAGES: ii-* - TARGETS: networkx - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-ii-a, cygwin-stage-ii-b, cygwin-stage-ii-c, cygwin-stage-ii-d, cygwin-stage-ii-e] - - runs-on: windows-latest - - continue-on-error: true - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - -############################################## stage-iv ########################################## - - cygwin-stage-iv: - env: - STAGE: iv - PREVIOUS_STAGES: iii-* - TARGETS: build - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iii-a, cygwin-stage-iii-b] - - runs-on: windows-latest - - continue-on-error: true - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - -############################################## stage-v ########################################### - - cygwin-stage-v-a: - env: - STAGE: v-a - PREVIOUS_STAGES: iv - TARGETS: ptest-nodoc - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iv] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-v-b: - env: - STAGE: v-b - PREVIOUS_STAGES: iv - TARGETS: 4ti2 pynormaliz topcom lrslib latte_int cryptominisat - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iv] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-v-c: - env: - STAGE: v-c - PREVIOUS_STAGES: iv - TARGETS: sage_numerical_backends_coin - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iv] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the $SAGE_LOCAL/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-v-d: - env: - STAGE: v-d - PREVIOUS_STAGES: iv - TARGETS: qepcad barvinok isl qhull primecount plantri kenzo libsemigroups mcqd meataxe mpfrcx openssl p_group_cohomology rst2ipynb sirocco tdlib tides - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iv] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the local/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() - - cygwin-stage-v-e: - env: - STAGE: v-e - PREVIOUS_STAGES: iv - TARGETS: doc-html - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - - needs: [cygwin-stage-iv] - - runs-on: windows-latest - - strategy: - fail-fast: false - matrix: - pkgs: [minimal] - steps: - - run: | - git config --global core.autocrlf false - git config --global core.symlinks true - - uses: actions/checkout@v1 - - name: install cygwin and test prerequisites with choco - shell: bash {0} - run: | - choco --version - PACKAGES="python39 python39-pip" - choco install $PACKAGES --source cygwin - - uses: actions/download-artifact@v2 - with: - name: ${{ env.LOCAL_ARTIFACT_NAME }} - path: C:\\tools\\cygwin\\tmp - - name: Extract sage-local artifact - run: | - C:\\tools\\cygwin\\bin\\dash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && .github/workflows/extract-sage-local.sh /tmp/sage-local-*.tar && tar --create --listed-incremental=/tmp/sage-local.snar --file /dev/null "${{ env.SAGE_LOCAL }}"' - - name: tox - run: | - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cat /proc/cpuinfo' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'python3.8 -m pip install tox' - C:\\tools\\cygwin\\bin\\bash -l -x -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && PREFIX="${{ env.SAGE_LOCAL }}" tox -e local-cygwin-choco-${{ matrix.pkgs }} -- $TARGETS' - - name: Prepare logs artifact - shell: bash - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; for a in "${{ env.SAGE_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" - if: always() - - uses: actions/upload-artifact@v2 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # The markup in the output is a GitHub Actions logging command - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions - shell: bash - run: | - 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' \; - if: always() - - name: Prepare sage-local artifact - # We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows. - # We remove the local/lib64 link, which will be recreated by the next stage. - run: | - C:\\tools\\cygwin\\bin\\bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && rm -f "${{ env.SAGE_LOCAL }}"/lib64; tar -cf /tmp/sage-local-${{ env.STAGE }}.tar --listed-incremental=/tmp/sage-local.snar "${{ env.SAGE_LOCAL }}"' - if: always() - - uses: actions/upload-artifact@v2 - with: - path: C:\\tools\\cygwin\\tmp\\sage-local-${{ env.STAGE }}.tar - name: ${{ env.LOCAL_ARTIFACT_NAME }} - if: always() diff --git a/.github/workflows/ci-cygwin-standard.yml b/.github/workflows/ci-cygwin-standard.yml index 32efd7f8a4a..53c674028ef 100644 --- a/.github/workflows/ci-cygwin-standard.yml +++ b/.github/workflows/ci-cygwin-standard.yml @@ -59,13 +59,11 @@ jobs: needs: [cygwin-stage-i-a, cygwin-stage-i-b] cygwin-stage-ii-e: - env: - STAGE: ii-e - PREVIOUS_STAGES: i-* - TARGETS: threejs tachyon pillow jmol m4rie sympy lrcalc lcalc symmetrica cliquer libbraiding planarity rw elliptic_curves combinatorial_designs sympow - LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-cygwin-${{ matrix.pkgs }} - + uses: ./.github/workflows/cygwin.yml + with: + stage: ii-e + previous_stages: i-* + targets: threejs tachyon pillow jmol m4rie sympy lrcalc lcalc symmetrica cliquer libbraiding planarity rw elliptic_curves combinatorial_designs sympow needs: [cygwin-stage-i-a, cygwin-stage-i-b] ############################################## stage-iii ########################################## diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index bd9821c1e0c..aca56f9b49c 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -162,41 +162,3 @@ jobs: ["maximal"] docker_targets: "with-targets-optional" targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :experimental: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep ^[p-z]))' - - local-ubuntu: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - max-parallel: 1 - matrix: - tox_system_factor: [conda-forge-ubuntu] - tox_packages_factor: [minimal, standard, environment, environment-optional] - env: - TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} - steps: - - uses: actions/checkout@v3 - - name: Install test prerequisites - run: | - sudo DEBIAN_FRONTEND=noninteractive apt-get update - sudo DEBIAN_FRONTEND=noninteractive apt-get install tox - - name: Build and test with tox - # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. - # For doctesting, we use a lower parallelization to avoid timeouts. - run: | - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS - - name: Prepare logs artifact - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" - if: always() - - uses: actions/upload-artifact@v3 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # and markup the output with GitHub Actions logging commands - run: | - .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" - if: always() diff --git a/.gitignore b/.gitignore index e62fa805ecd..b93c5dbd12b 100644 --- a/.gitignore +++ b/.gitignore @@ -221,9 +221,6 @@ src/ENV/ src/env.bak/ src/venv.bak/ -# devcontainer -/.devcontainer/devcontainer.json - # mypy **/.mypy_cache/ diff --git a/src/doc/en/developer/portability_testing.rst b/src/doc/en/developer/portability_testing.rst index 54facbfd1ce..f1a3e5c49fa 100644 --- a/src/doc/en/developer/portability_testing.rst +++ b/src/doc/en/developer/portability_testing.rst @@ -1164,23 +1164,7 @@ provides sample ``devcontainer.json`` configuration files `_ for this purpose. -To get started, symlink (or copy) one of the sample files to -``$SAGE_ROOT/.devcontainer/devcontainer.json``. For example, choose -`$SAGE_ROOT/.devcontainer/portability-ubuntu-jammy-standard/devcontainer.json -`_, which uses the Docker image based on ``ubuntu-jammy-standard``, -the most recent -development version of Sage (``dev`` tag), and a full installation of -the Sage distribution (``with-targets``). - -In macOS for example, you can do this using the shell as follows:: - - [mkoeppe@sage sage] $ (cd .devcontainer && ln -s portability-ubuntu-jammy-standard/devcontainer.json .) - -Now start VS Code:: - - [mkoeppe@sage sage] $ code . - -Then VS Code may prompt you whether you would like to open the current +If you open the sage folder in VS Code, it may prompt you whether you would like to open the current directory in the dev container (yes). If it does not, use the command palette (:kbd:`Ctrl` + :kbd:`Shift` + :kbd:`P`), enter the command "Remote-Containers: Reopen Folder in Container" , and hit :kbd:`Enter`. @@ -1190,6 +1174,14 @@ application, then in the command palette of VS Code, enter "Remote-Containers: Open Folder in Container", and hit :kbd:`Enter`, and choose the directory ``$SAGE_ROOT`` of your local Sage repository. +VS Code then prompts you to choose a dev container configuration. +For example, choose "Ubuntu jammy" `.devcontainer/portability-ubuntu-jammy-standard/devcontainer.json +`_, +which uses the Docker image based on ``ubuntu-jammy-standard``, the most recent +development version of Sage (``dev`` tag), and a full installation of +the Sage distribution (``with-targets``). Other dev container configurations +are described below. + Once VS Code starts configuring the dev container, by clicking on "show log", you can see what it does: @@ -1225,8 +1217,7 @@ in a terminal, `open a new terminal in VS Code ``configure`` script. You can edit a copy of the configuration file to change to a different platform, another -version, or build stage. After editing the configuration file (or changing the -symlink), run "Remote-Containers: Rebuild Container" from the command +version, or build stage. After editing the configuration file, run "Remote-Containers: Rebuild Container" from the command palette. See the `VS Code devcontainer.json reference `_ and the `GitHub introduction to dev containers @@ -1248,8 +1239,7 @@ installation of SageMath in this container by building from the current source t project `_, providing SnapPy, Regina, PHCPack, etc. -If you want to use one of these ``devcontainer.json`` files, symlink (or copy) -it and start VS Code as explained above. After VS Code finished configuring the +After VS Code finished configuring the dev container, to use Sage in a terminal, `open a new terminal in VS Code `_, type ``./sage`` and hit :kbd:`Enter`. @@ -1284,8 +1274,7 @@ work without change) or to adapt them to your needs. project `_, providing SnapPy, Regina, PHCPack, etc. -If you want to use one of these ``devcontainer.json`` files, symlink (or copy) -it and start VS Code as explained above. After VS Code finished configuring the +After VS Code finished configuring the dev container, to use Sage in a terminal, `open a new terminal in VS Code `_, type ``sage`` and hit :kbd:`Enter`. (Do not use ``./sage``; this will not work because the source diff --git a/src/sage/schemes/toric/sheaf/klyachko.py b/src/sage/schemes/toric/sheaf/klyachko.py index b1304a16913..77fae4b7545 100644 --- a/src/sage/schemes/toric/sheaf/klyachko.py +++ b/src/sage/schemes/toric/sheaf/klyachko.py @@ -26,7 +26,7 @@ (0, 0, 18, 16, 1) sage: Gtilde = G_sum.random_deformation() sage: V = Gtilde.wedge(2) * K # long time - sage: V.cohomology(dim=True, weight=(0,0,0,0)) # long time + sage: V.cohomology(dim=True, weight=(0,0,0,0)) # long time # random failure (see #32773) (0, 0, 3, 0, 0) REFERENCES: @@ -948,7 +948,7 @@ def random_deformation(self, epsilon=None): sage: V.cohomology(dim=True, weight=(0,)) (1, 0) sage: Vtilde = V.random_deformation() - sage: Vtilde.cohomology(dim=True, weight=(0,)) + sage: Vtilde.cohomology(dim=True, weight=(0,)) # random failure (see #32773) (1, 0) """ filt = self._filt.random_deformation(epsilon) diff --git a/tox.ini b/tox.ini index 5eb3e79633b..1d17c7d175f 100644 --- a/tox.ini +++ b/tox.ini @@ -272,7 +272,6 @@ setenv = fedora-31: BASE_TAG=31 fedora-32: BASE_TAG=32 fedora-33: BASE_TAG=33 - fedora-33: IGNORE_MISSING_SYSTEM_PACKAGES=no fedora-34: BASE_TAG=34 fedora-34: IGNORE_MISSING_SYSTEM_PACKAGES=no fedora-35: BASE_TAG=35