diff options
| author | Árni Dagur <arni@dagur.eu> | 2022-07-17 22:47:05 +0200 |
|---|---|---|
| committer | Árni Dagur <arni@dagur.eu> | 2022-07-18 00:12:16 +0200 |
| commit | 3fcd327a63ae331e641565db0e178a9a64b4b0dd (patch) | |
| tree | a80e19fe3ba4097a89ebd3a58681faacfe68962e /.github/workflows/ci.yml | |
| parent | 83a211f741fc7de635181af71f7074ccce852aa8 (diff) | |
Update Rust dependencies
Diffstat (limited to '.github/workflows/ci.yml')
| -rw-r--r-- | .github/workflows/ci.yml | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e88885..1beb8ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml | |||
| @@ -26,15 +26,19 @@ jobs: | |||
| 26 | command: fmt | 26 | command: fmt |
| 27 | args: -- --check | 27 | args: -- --check |
| 28 | 28 | ||
| 29 | - name: Lint with clippy | 29 | # Disabled because of https://github.com/rust-lang/rust-clippy/issues/8971 |
| 30 | uses: actions-rs/cargo@v1 | 30 | # - name: Lint with clippy |
| 31 | with: | 31 | # uses: actions-rs/cargo@v1 |
| 32 | command: clippy | 32 | # with: |
| 33 | args: --all-targets --all-features -- -D clippy::all | 33 | # command: clippy |
| 34 | # args: --all-targets --all-features -- -D clippy::all | ||
| 34 | 35 | ||
| 35 | - name: Lint with Black | 36 | - name: Lint with Black |
| 36 | run: pip install black && black --check . | 37 | run: pip install black && black --check . |
| 37 | 38 | ||
| 39 | - name: Lint with mypy | ||
| 40 | run: pip install mypy && mypy --non-interactive --install-types --ignore-missing-imports . | ||
| 41 | |||
| 38 | macos: | 42 | macos: |
| 39 | runs-on: macos-latest | 43 | runs-on: macos-latest |
| 40 | needs: lint | 44 | needs: lint |
| @@ -43,7 +47,7 @@ jobs: | |||
| 43 | 47 | ||
| 44 | - uses: actions/setup-python@v2 | 48 | - uses: actions/setup-python@v2 |
| 45 | with: | 49 | with: |
| 46 | python-version: 3.6 | 50 | python-version: 3.7 |
| 47 | 51 | ||
| 48 | - name: Install Rust toolchain | 52 | - name: Install Rust toolchain |
| 49 | uses: actions-rs/toolchain@v1 | 53 | uses: actions-rs/toolchain@v1 |
| @@ -68,7 +72,7 @@ jobs: | |||
| 68 | PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib | 72 | PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib |
| 69 | run: | | 73 | run: | |
| 70 | # Build wheels | 74 | # Build wheels |
| 71 | maturin build -i python --release --universal2 --out dist --no-sdist | 75 | maturin build -i python --release --universal2 --out dist |
| 72 | pip install adblock --no-index --find-links dist --force-reinstall | 76 | pip install adblock --no-index --find-links dist --force-reinstall |
| 73 | 77 | ||
| 74 | - name: Run PyTest | 78 | - name: Run PyTest |
| @@ -101,7 +105,7 @@ jobs: | |||
| 101 | 105 | ||
| 102 | - uses: actions/setup-python@v2 | 106 | - uses: actions/setup-python@v2 |
| 103 | with: | 107 | with: |
| 104 | python-version: 3.6 | 108 | python-version: 3.7 |
| 105 | architecture: ${{ matrix.platform.python-architecture }} | 109 | architecture: ${{ matrix.platform.python-architecture }} |
| 106 | 110 | ||
| 107 | - name: Install Rust toolchain | 111 | - name: Install Rust toolchain |
| @@ -117,7 +121,7 @@ jobs: | |||
| 117 | 121 | ||
| 118 | - name: Build wheels | 122 | - name: Build wheels |
| 119 | run: | | 123 | run: | |
| 120 | maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} | 124 | maturin build -i python --release --out dist --target ${{ matrix.platform.target }} |
| 121 | pip install adblock --no-index --find-links dist --force-reinstall | 125 | pip install adblock --no-index --find-links dist --force-reinstall |
| 122 | 126 | ||
| 123 | - name: Run PyTest | 127 | - name: Run PyTest |
| @@ -143,25 +147,25 @@ jobs: | |||
| 143 | platform: | 147 | platform: |
| 144 | [ | 148 | [ |
| 145 | { | 149 | { |
| 146 | toolchain: "1.49", | 150 | toolchain: "1.53", |
| 147 | manylinux: "2010", | 151 | manylinux: "2010", |
| 148 | target: "x86_64-unknown-linux-gnu", | 152 | target: "x86_64-unknown-linux-gnu", |
| 149 | arch: "x86_64", | 153 | arch: "x86_64", |
| 150 | python-version: "3.6" | 154 | python-version: "3.7" |
| 151 | }, | 155 | }, |
| 152 | { | 156 | { |
| 153 | toolchain: "nightly", | 157 | toolchain: "nightly", |
| 154 | manylinux: "2010", | 158 | manylinux: "2010", |
| 155 | target: "x86_64-unknown-linux-gnu", | 159 | target: "x86_64-unknown-linux-gnu", |
| 156 | arch: "x86_64", | 160 | arch: "x86_64", |
| 157 | python-version: "3.6" | 161 | python-version: "3.7" |
| 158 | }, | 162 | }, |
| 159 | { | 163 | { |
| 160 | toolchain: "stable", | 164 | toolchain: "stable", |
| 161 | manylinux: "2010", | 165 | manylinux: "2010", |
| 162 | target: "x86_64-unknown-linux-gnu", | 166 | target: "x86_64-unknown-linux-gnu", |
| 163 | arch: "x86_64", | 167 | arch: "x86_64", |
| 164 | python-version: "3.6" | 168 | python-version: "3.7" |
| 165 | }, | 169 | }, |
| 166 | { | 170 | { |
| 167 | toolchain: "stable", | 171 | toolchain: "stable", |
| @@ -169,7 +173,7 @@ jobs: | |||
| 169 | target: "x86_64-unknown-linux-gnu", | 173 | target: "x86_64-unknown-linux-gnu", |
| 170 | arch: "x86_64", | 174 | arch: "x86_64", |
| 171 | python-version: "3.10" | 175 | python-version: "3.10" |
| 172 | }, | 176 | } |
| 173 | ] | 177 | ] |
| 174 | steps: | 178 | steps: |
| 175 | - uses: actions/checkout@v2 | 179 | - uses: actions/checkout@v2 |
| @@ -184,7 +188,7 @@ jobs: | |||
| 184 | source ~/.cargo/env | 188 | source ~/.cargo/env |
| 185 | export PATH=/opt/python/cp38-cp38/bin:$PATH | 189 | export PATH=/opt/python/cp38-cp38/bin:$PATH |
| 186 | pip install maturin | 190 | pip install maturin |
| 187 | maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} | 191 | maturin build -i python --release --out dist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} |
| 188 | ' > build-wheel.sh | 192 | ' > build-wheel.sh |
| 189 | chmod +x build-wheel.sh | 193 | chmod +x build-wheel.sh |
| 190 | docker run --rm -v "$PWD":/io -w /io quay.io/pypa/manylinux${{ matrix.platform.manylinux }}_${{ matrix.platform.arch }} bash build-wheel.sh | 194 | docker run --rm -v "$PWD":/io -w /io quay.io/pypa/manylinux${{ matrix.platform.manylinux }}_${{ matrix.platform.arch }} bash build-wheel.sh |
| @@ -234,23 +238,23 @@ jobs: | |||
| 234 | 238 | ||
| 235 | - uses: actions/setup-python@v2 | 239 | - uses: actions/setup-python@v2 |
| 236 | with: | 240 | with: |
| 237 | python-version: 3.6 | 241 | python-version: 3.7 |
| 238 | 242 | ||
| 239 | - name: Build Wheels | 243 | - name: Build Wheels |
| 240 | run: | | 244 | run: | |
| 241 | echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | 245 | echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable |
| 242 | source ~/.cargo/env | 246 | source ~/.cargo/env |
| 243 | rustup target add ${{ matrix.platform.target }} | 247 | rustup target add ${{ matrix.platform.target }} |
| 244 | maturin build -i python --release --out dist --no-sdist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} | 248 | maturin build -i python --release --out dist --target ${{ matrix.platform.target }} --manylinux ${{ matrix.platform.manylinux }} |
| 245 | ' > build-wheel.sh | 249 | ' > build-wheel.sh |
| 246 | chmod +x build-wheel.sh | 250 | chmod +x build-wheel.sh |
| 247 | docker run --rm -v "$PWD":/io -w /io messense/manylinux2014-cross:${{ matrix.platform.arch }} bash build-wheel.sh | 251 | docker run --rm -v "$PWD":/io -w /io messense/manylinux2014-cross:${{ matrix.platform.arch }} bash build-wheel.sh |
| 248 | 252 | ||
| 249 | - uses: uraimo/run-on-arch-action@v2.0.5 | 253 | - uses: uraimo/run-on-arch-action@v2.2.0 |
| 250 | name: Install built wheel | 254 | name: Install built wheel |
| 251 | with: | 255 | with: |
| 252 | arch: ${{ matrix.platform.arch }} | 256 | arch: ${{ matrix.platform.arch }} |
| 253 | distro: ubuntu18.04 | 257 | distro: ubuntu22.04 |
| 254 | # Mount the dist directory as /artifacts in the container | 258 | # Mount the dist directory as /artifacts in the container |
| 255 | dockerRunArgs: | | 259 | dockerRunArgs: | |
| 256 | --volume "${PWD}/dist:/artifacts" | 260 | --volume "${PWD}/dist:/artifacts" |
