diff options
author | Ingy döt Net <ingy@ingy.net> | 2020-12-23 09:53:43 -0500 |
---|---|---|
committer | Ingy döt Net <ingy@ingy.net> | 2021-01-13 16:58:40 -0500 |
commit | 219fe65b66d8d658119d1e2b48bf7313701352db (patch) | |
tree | ef043bf4e978ffbfcc5854a5d62922e2c8fde1b6 | |
parent | 6a19fd77a0cdf81525b03cfea751ca46666e9137 (diff) | |
download | pyyaml-git-219fe65b66d8d658119d1e2b48bf7313701352db.tar.gz |
Don't overindent sequences in maps
-rw-r--r-- | .github/workflows/ci.yaml | 321 |
1 files changed, 160 insertions, 161 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 772959c..4aabc02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,4 @@ --- - name: PyYAML CI on: push: @@ -14,55 +13,55 @@ jobs: name: pyyaml sdist runs-on: ubuntu-latest steps: - - name: checkout pyyaml - uses: actions/checkout@v2 + - name: checkout pyyaml + uses: actions/checkout@v2 - - name: install a python - uses: actions/setup-python@v2 - with: - python-version: 3.x + - name: install a python + uses: actions/setup-python@v2 + with: + python-version: 3.x - - name: install build deps - run: | - python -V + - name: install build deps + run: | + python -V - python -m pip install build + python -m pip install build - - name: build sdist - run: | - export PYYAML_FORCE_CYTHON=1 # we DO want to force Cythoning, at least until 6.0 - export PYYAML_FORCE_LIBYAML=0 # we don't actually want to build the lib + - name: build sdist + run: | + export PYYAML_FORCE_CYTHON=1 # we DO want to force Cythoning, at least until 6.0 + export PYYAML_FORCE_LIBYAML=0 # we don't actually want to build the lib - python -m build . + python -m build . - # ensure exactly one artifact was produced - shopt -s nullglob - DISTFILES=(dist/*.tar.gz) - if [[ ${DISTFILES[@]} -ne 1 ]]; then - echo "unexpected content in dist dir: $(ls dist/*.tar.gz)" - exit 1 - fi + # ensure exactly one artifact was produced + shopt -s nullglob + DISTFILES=(dist/*.tar.gz) + if [[ ${DISTFILES[@]} -ne 1 ]]; then + echo "unexpected content in dist dir: $(ls dist/*.tar.gz)" + exit 1 + fi - - name: test sdist - run: | - # install some libyaml headers - # TODO: should we smoke test the sdist against the libyaml we built? - sudo apt update - sudo apt install libyaml-dev -y + - name: test sdist + run: | + # install some libyaml headers + # TODO: should we smoke test the sdist against the libyaml we built? + sudo apt update + sudo apt install libyaml-dev -y - # ensure Cython is not present so we use only what's in the sdist - python -m pip uninstall Cython -y || true + # ensure Cython is not present so we use only what's in the sdist + python -m pip uninstall Cython -y || true - # pass no extra args- we should auto-install with libyaml since it's present - python -m pip install dist/*.tar.gz -v + # pass no extra args- we should auto-install with libyaml since it's present + python -m pip install dist/*.tar.gz -v - python packaging/build/smoketest.py + python packaging/build/smoketest.py - - name: upload sdist artifact - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist/*.tar.gz + - name: upload sdist artifact + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.tar.gz linux_libyaml: @@ -71,31 +70,31 @@ jobs: strategy: matrix: platform: - # manylinux1 is forward-compatible to 2010/2014 - #- manylinux2014 - #- manylinux2010 - - manylinux1 + # manylinux1 is forward-compatible to 2010/2014 + #- manylinux2014 + #- manylinux2010 + - manylinux1 arch: - - x86_64 + - x86_64 env: DOCKER_IMAGE: quay.io/pypa/${{ matrix.platform }}_${{ matrix.arch }} steps: - - name: check cached libyaml state - id: cached_libyaml - uses: actions/cache@v2 - with: - path: | - libyaml - key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} - - - name: checkout pyyaml - uses: actions/checkout@v2 - if: steps.cached_libyaml.outputs.cache-hit != 'true' - - - name: build libyaml - run: | - docker run --rm -v $(pwd):/io -e LIBYAML_REF -e LIBYAML_REPO --workdir /io "$DOCKER_IMAGE" /io/packaging/build/libyaml.sh - if: steps.cached_libyaml.outputs.cache-hit != 'true' + - name: check cached libyaml state + id: cached_libyaml + uses: actions/cache@v2 + with: + path: | + libyaml + key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} + + - name: checkout pyyaml + uses: actions/checkout@v2 + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: build libyaml + run: | + docker run --rm -v $(pwd):/io -e LIBYAML_REF -e LIBYAML_REPO --workdir /io "$DOCKER_IMAGE" /io/packaging/build/libyaml.sh + if: steps.cached_libyaml.outputs.cache-hit != 'true' linux_pyyaml: needs: linux_libyaml @@ -104,56 +103,56 @@ jobs: strategy: matrix: platform: - # so long as manylinux1 container builds work, they're forward-compatible to 2010/2014 - # - manylinux2014 - # - manylinux2010 - - manylinux1 + # so long as manylinux1 container builds work, they're forward-compatible to 2010/2014 + # - manylinux2014 + # - manylinux2010 + - manylinux1 arch: - - x86_64 + - x86_64 python_tag: - # NB: manylinux >=2014 containers don't have Python 2.7, so we have to use exclude to skip it - - cp27-cp27mu - - cp36-cp36m - - cp37-cp37m - - cp38-cp38 - - cp39-cp39 + # NB: manylinux >=2014 containers don't have Python 2.7, so we have to use exclude to skip it + - cp27-cp27mu + - cp36-cp36m + - cp37-cp37m + - cp38-cp38 + - cp39-cp39 # exclude: -# - platform: manylinux2014 -# arch: x86_64 -# python_tag: cp27-cp27mu +# - platform: manylinux2014 +# arch: x86_64 +# python_tag: cp27-cp27mu env: AW_PLAT: ${{ matrix.platform }}_${{ matrix.arch }} DOCKER_IMAGE: quay.io/pypa/${{ matrix.platform }}_${{ matrix.arch }} PYTHON_TAG: ${{ matrix.python_tag }} PYYAML_BUILD_WHEELS: 1 steps: - - uses: actions/checkout@v2 - - - name: fetch cached libyaml - id: cached_libyaml - uses: actions/cache@v2 - with: - path: | - libyaml - key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} - - - name: ensure libyaml fetched - run: exit 1 - if: steps.cached_libyaml.outputs.cache-hit != 'true' - - - name: start container - run: | - docker run --name worker -t -d --rm -v $(pwd):/io "$DOCKER_IMAGE" bash - - - name: build/test/package - run: | - docker exec -e PYTHON_TAG -e PYYAML_RUN_TESTS -e PYYAML_BUILD_WHEELS -e AW_PLAT --workdir /io worker \ - /io/packaging/build/manylinux.sh - - - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist/*.whl + - uses: actions/checkout@v2 + + - name: fetch cached libyaml + id: cached_libyaml + uses: actions/cache@v2 + with: + path: | + libyaml + key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} + + - name: ensure libyaml fetched + run: exit 1 + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: start container + run: | + docker run --name worker -t -d --rm -v $(pwd):/io "$DOCKER_IMAGE" bash + + - name: build/test/package + run: | + docker exec -e PYTHON_TAG -e PYYAML_RUN_TESTS -e PYYAML_BUILD_WHEELS -e AW_PLAT --workdir /io worker \ + /io/packaging/build/manylinux.sh + + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.whl macos_libyaml: name: libyaml ${{ matrix.arch }} ${{ matrix.platform }} @@ -161,30 +160,29 @@ jobs: strategy: matrix: platform: - - macos-10.15 + - macos-10.15 arch: - - x86_64 + - x86_64 steps: - - name: check cached libyaml state - id: cached_libyaml - uses: actions/cache@v2 - with: - path: | - libyaml - key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} - - - name: checkout pyyaml - uses: actions/checkout@v2 - if: steps.cached_libyaml.outputs.cache-hit != 'true' - - - name: build libyaml - env: - MACOSX_DEPLOYMENT_TARGET: '10.9' - run: | - brew install automake coreutils - bash ./packaging/build/libyaml.sh - if: steps.cached_libyaml.outputs.cache-hit != 'true' - + - name: check cached libyaml state + id: cached_libyaml + uses: actions/cache@v2 + with: + path: | + libyaml + key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} + + - name: checkout pyyaml + uses: actions/checkout@v2 + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: build libyaml + env: + MACOSX_DEPLOYMENT_TARGET: '10.9' + run: | + brew install automake coreutils + bash ./packaging/build/libyaml.sh + if: steps.cached_libyaml.outputs.cache-hit != 'true' macos_pyyaml: needs: macos_libyaml @@ -193,44 +191,45 @@ jobs: strategy: matrix: platform: - - macos-10.15 + - macos-10.15 arch: - - x86_64 + - x86_64 python_tag: - - cp27* - - cp36* - - cp37* - - cp38* - - cp39* + - cp27* + - cp36* + - cp37* + - cp38* + - cp39* steps: - - name: checkout pyyaml - uses: actions/checkout@v2 - - - name: get cached libyaml state - id: cached_libyaml - uses: actions/cache@v2 - with: - path: | - libyaml - key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} - - - name: ensure libyaml fetched - run: exit 1 - if: steps.cached_libyaml.outputs.cache-hit != 'true' - - - name: install a python - uses: actions/setup-python@v2 - with: - python-version: 3.x - - - name: build/test/package - env: - CIBW_BUILD: ${{ matrix.python_tag }} - CIBW_BUILD_VERBOSITY: 1 - run: | - bash ./packaging/build/macos.sh - - - uses: actions/upload-artifact@v2 - with: - name: dist - path: dist/*.whl + - name: checkout pyyaml + uses: actions/checkout@v2 + + - name: get cached libyaml state + id: cached_libyaml + uses: actions/cache@v2 + with: + path: | + libyaml + key: libyaml_${{ matrix.platform }}_${{ matrix.arch }}_${{ env.LIBYAML_REF }} + + - name: ensure libyaml fetched + run: exit 1 + if: steps.cached_libyaml.outputs.cache-hit != 'true' + + - name: install a python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: build/test/package + env: + CIBW_BUILD: ${{ matrix.python_tag }} + CIBW_BUILD_VERBOSITY: 1 + run: | + bash ./packaging/build/macos.sh + + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.whl +... |