|
25 | 25 | strategy: |
26 | 26 | fail-fast: false # Continue with other jobs if one fails |
27 | 27 | matrix: |
28 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
| 28 | + os: [ubuntu-latest, macos-latest] |
29 | 29 | python-version: ['3.11'] |
30 | 30 |
|
31 | 31 | steps: |
@@ -64,53 +64,33 @@ jobs: |
64 | 64 | run: | |
65 | 65 | python -m venv .venv |
66 | 66 | echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV |
| 67 | + echo "$PWD/.venv/bin" >> $GITHUB_PATH |
67 | 68 | |
68 | | - - name: Set PATH for Unix |
69 | | - if: matrix.os != 'windows-latest' |
70 | | - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH |
71 | | - |
72 | | - - name: Set PATH for Windows |
73 | | - if: matrix.os == 'windows-latest' |
74 | | - run: echo "$PWD/.venv/Scripts" >> $GITHUB_PATH |
75 | | - shell: bash |
76 | | - |
77 | | - # Attempt to install OpenSSL using Chocolatey for Windows if needed by the crate itself |
78 | | - - name: Install OpenSSL (Windows only) |
79 | | - if: matrix.os == 'windows-latest' |
80 | | - run: choco install openssl -y --no-progress || echo "OpenSSL installation failed, continuing..." |
81 | | - shell: bash |
82 | | - |
83 | 69 | - name: Install dependencies |
84 | 70 | run: | |
85 | 71 | python -m pip install --upgrade pip |
86 | 72 | pip install pytest pytest-benchmark |
87 | | - if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt || echo "Failed to install some dependencies from tests/requirements.txt, continuing..."; fi |
| 73 | + if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi |
88 | 74 | shell: bash |
89 | 75 |
|
90 | 76 | - name: Build and install package with maturin |
91 | 77 | uses: PyO3/maturin-action@v1 |
92 | 78 | with: |
93 | 79 | python-interpreter: ${{ steps.setup_python.outputs.python-path }} |
94 | | - target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || (matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64') }} |
| 80 | + target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || 'x86_64' }} |
95 | 81 | command: develop |
96 | 82 | args: --release |
97 | 83 | sccache: 'true' |
98 | 84 |
|
99 | 85 | - name: Run tests |
100 | | - run: | |
101 | | - # Skip c2pa-python comparison tests on Windows if necessary |
102 | | - if [ "${{ matrix.os }}" == "windows-latest" ]; then |
103 | | - # Only run tests that don't require c2pa-python if installation failed |
104 | | - pip list | grep -q c2pa-python || export SKIP_COMPARISON_TESTS=1 |
105 | | - fi |
106 | | - python run_tests.py |
| 86 | + run: python run_tests.py |
107 | 87 | continue-on-error: true # Continue even if tests fail to get wheels |
108 | 88 |
|
109 | 89 | - name: Build wheel |
110 | 90 | uses: PyO3/maturin-action@v1 |
111 | 91 | with: |
112 | 92 | python-interpreter: ${{ steps.setup_python.outputs.python-path }} |
113 | | - target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || (matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64') }} |
| 93 | + target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || 'x86_64' }} |
114 | 94 | command: build |
115 | 95 | args: --release |
116 | 96 | sccache: 'true' |
|
0 commit comments