update upload artifact CI step #75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: wheels | |
| on: [ push, pull_request ] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, macos-13, windows-latest ] | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: "10.14" # https://cibuildwheel.pypa.io/en/stable/cpp_standards/#macos-and-deployment-target-versions | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| with: | |
| package-dir: ./ | |
| output-dir: ./wheelhouse | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| check_contents: | |
| name: Build full dist and check contents | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: "wheels" | |
| pattern: "wheels-*" | |
| delete-merged: true | |
| - name: Download wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wheels | |
| path: dist | |
| - name: Build sdist | |
| run: | | |
| pip install build click | |
| python -m build --sdist | |
| - name: Test packages | |
| run: | | |
| python test_contents.py | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: pkgs | |
| path: ./dist | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| needs: check_contents | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, macos-13, windows-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Download wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wheels | |
| path: dist | |
| - name: Install wheel | |
| run: pip install --no-index --find-links ./dist ogdf-wheel | |
| - name: Install ogdf-python | |
| run: pip install git+https://github.com/N-Coder/ogdf-python.git | |
| - name: Get ogdf-python info | |
| run: python -m ogdf_python | |
| - name: Test ogdf-python layouts | |
| run: python test_layouts.py | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: svgs-${{ matrix.os }} | |
| path: ./*.svg |