More temp at this point. #1
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: "Test PIP Package" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "python/**" | |
| - "slice/**" | |
| - ".github/actions/setup-cpp/**" | |
| - ".github/actions/setup-python/**" | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - "python/**" | |
| - "slice/**" | |
| - ".github/actions/setup-cpp/**" | |
| - ".github/actions/setup-python/**" | |
| jobs: | |
| build-sdist: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup C++ | |
| uses: ./.github/actions/setup-cpp | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Install Build Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| - name: Build Source Distribution | |
| working-directory: python | |
| run: python -m build --sdist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdist | |
| path: python/dist/zeroc_ice-*.tar.gz | |
| test-pip-package: | |
| needs: build-sdist | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-26, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup C++ | |
| uses: ./.github/actions/setup-cpp | |
| with: | |
| profile: pip-bdist | |
| - name: Setup Python | |
| uses: ./.github/actions/setup-python | |
| - name: Download sdist | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: sdist | |
| path: sdist | |
| - name: Build Wheel from sdist (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip wheel sdist/*.tar.gz --no-deps -w dist/ | |
| - name: Build Wheel from sdist (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip wheel (Get-ChildItem sdist\*.tar.gz).FullName --no-deps -w dist/ | |
| - name: Create Test Virtual Environment | |
| run: python -m venv test-venv | |
| - name: Install Package (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| source test-venv/bin/activate | |
| pip install dist/*.whl | |
| pip install cryptography | |
| - name: Install Package (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| test-venv\Scripts\Activate.ps1 | |
| pip install (Get-ChildItem dist\*.whl).FullName | |
| pip install cryptography | |
| - name: Run Tests (Unix) | |
| if: runner.os != 'Windows' | |
| working-directory: python | |
| run: | | |
| source ../test-venv/bin/activate | |
| python allTests.py --load-slice --pip-package --rfilter="Glacier2|IceGrid|IceBox|IceMX" | |
| - name: Run Tests (Windows) | |
| if: runner.os == 'Windows' | |
| working-directory: python | |
| shell: pwsh | |
| run: | | |
| ..\test-venv\Scripts\Activate.ps1 | |
| python allTests.py --load-slice --pip-package --rfilter="Glacier2|IceGrid|IceBox|IceMX" |