Python support 3.11 #78
Workflow file for this run
This file contains 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
# This workflow is where we run tests depending on what files have been | |
# modified. This allows us to segment modified areas of the code and run only | |
# the tests corresponding to any changes. | |
# | |
# One exception is that we want to run all tests if the 'core' has been modified in | |
# any way. | |
name: CI | |
on: | |
pull_request: | |
# Cancel in progress workflows on pull_requests. | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
# JOB to run change detection | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
core: ${{ steps.filter.outputs.core }} | |
go: ${{ steps.filter.outputs.go }} | |
javascript: ${{ steps.filter.outputs.javascript }} | |
python: ${{ steps.filter.outputs.python }} | |
rust: ${{ steps.filter.outputs.rust }} | |
steps: | |
- uses: actions/checkout@v4 | |
# For pull requests it's not necessary to checkout the code | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
core: | |
- 'private_set_intersection/c/**' | |
- 'private_set_intersection/cpp/**' | |
- 'private_set_intersection/proto/**' | |
- 'private_set_intersection/BUILD' | |
- 'private_set_intersection/*.bzl' | |
- 'tools/BUILD' | |
- 'tools/common.bzl' | |
- '.clang-format' | |
- '.bazelrc' | |
- '.bazelversion' | |
- 'MODULE.bazel' | |
- 'MODULE.bazel.lock' | |
- 'WORKSPACE' | |
go: | |
- 'private_set_intersection/go/**' | |
- '.bazelrc' | |
- '.bazelversion' | |
- 'WORKSPACE' | |
javascript: | |
- 'private_set_intersection/javascript/**' | |
- '*.json' | |
- '*.js' | |
- '.prettier*' | |
- '.eslint*' | |
- '.bazelrc' | |
- '.bazelversion' | |
- 'MODULE.bazel' | |
- 'MODULE.bazel.lock' | |
- 'WORKSPACE' | |
python: | |
- 'private_set_intersection/python/**' | |
- '.flake8' | |
- '.pyproject.toml' | |
- '.bazelrc' | |
- '.bazelversion' | |
- 'MODULE.bazel' | |
- 'MODULE.bazel.lock' | |
- 'WORKSPACE' | |
rust: | |
- 'private_set_intersection/rust/**' | |
- 'third_party/**' | |
- '.bazelrc' | |
- '.bazelversion' | |
- 'MODULE.bazel' | |
- 'MODULE.bazel.lock' | |
- 'WORKSPACE' | |
Core: | |
needs: changes | |
if: ${{ needs.changes.outputs.core == 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests nix | |
timeout-minutes: 60 | |
run: .github/workflows/scripts/run_tests_core.sh | |
- name: Linters | |
run: .github/workflows/scripts/lint_cpp.sh | |
if: ${{ matrix.os == 'ubuntu-24.04' }} | |
JS: | |
needs: changes | |
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.javascript == 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests nix | |
timeout-minutes: 60 | |
run: .github/workflows/scripts/run_tests_js.sh | |
Python: | |
needs: changes | |
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.python == 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
[ubuntu-24.04, macos-14] | |
# Bazel uses hermetic python, these are just placeholders | |
python-version: ['3_8', '3_9', '3_10', '3_11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run tests nix | |
timeout-minutes: 30 | |
run: bazel test --test_output=all //private_set_intersection/python:test_${{ matrix.python-version }} | |
Go: | |
needs: changes | |
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.go == 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-14] | |
golang-version: ['1.23'] | |
steps: | |
- name: Set up Golang ${{ matrix.golang-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.golang-version }} | |
id: go | |
- name: Install Go dependencies | |
run: go install golang.org/x/lint/golint@latest | |
- uses: actions/checkout@v4 | |
- name: Run tests nix | |
timeout-minutes: 30 | |
run: .github/workflows/scripts/run_tests_go.sh | |
- name: Go linters | |
run: .github/workflows/scripts/lint_go.sh | |
Rust: | |
needs: changes | |
if: ${{ needs.changes.outputs.core == 'true' || needs.changes.outputs.rust == 'true' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, macos-14] | |
steps: | |
- name: Install toolchains | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
- uses: actions/checkout@v4 | |
- name: Run tests nix | |
timeout-minutes: 30 | |
run: .github/workflows/scripts/run_tests_rust.sh |