diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fa01906910..f6d933cf01 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,8 +1,16 @@ on: push: branches: [main, release] + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE' pull_request: types: [unlabeled, opened, synchronize, reopened] + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE' merge_group: workflow_dispatch: @@ -86,14 +94,6 @@ jobs: run: cargo build --no-default-features --features ssl-openssl if: runner.os == 'Linux' - # - name: Install tk-dev for tkinter build - # run: sudo apt-get update && sudo apt-get install -y tk-dev - # if: runner.os == 'Linux' - - # - name: Test tkinter build - # run: cargo build --features tkinter - # if: runner.os == 'Linux' - - name: Test example projects run: | cargo run --manifest-path example_projects/barebone/Cargo.toml @@ -110,6 +110,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }} name: Ensure compilation on various targets runs-on: ${{ matrix.os }} + timeout-minutes: 30 strategy: matrix: include: @@ -165,14 +166,6 @@ jobs: ndk-version: r27 add-to-path: true - # - name: Prepare repository for redox compilation - # run: bash scripts/redox/uncomment-cargo.sh - # - name: Check compilation for Redox - # uses: coolreader18/redoxer-action@v1 - # with: - # command: check - # args: --ignore-rust-version - - name: Check compilation run: | for target in ${{ join(matrix.targets, ' ') }} @@ -237,10 +230,13 @@ jobs: - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: release-${{ matrix.os }} - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + cache-dependency-path: extra_tests/requirements.txt - name: Install macOS dependencies uses: ./.github/actions/install-macos-deps @@ -276,6 +272,7 @@ jobs: RUSTPYTHON_SKIP_ENV_POLLUTERS: true - name: run cpython tests to check if env polluters have stopped polluting + if: ${{ join(matrix.env_polluting_tests, '') != '' }} shell: bash run: | IFS=' ' read -r -a target_array <<< "$TARGETS" @@ -331,6 +328,7 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 15 permissions: contents: read checks: write @@ -453,6 +451,8 @@ jobs: - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + cache-dependency-path: wasm/tests/requirements.txt - run: python -m pip install -r requirements.txt working-directory: ./wasm/tests