fix(ci): Fix docs deployment for CI #285
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| # check python formatting | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - uses: astral-sh/ruff-action@v3 | |
| name: Ruff | |
| # check python typing | |
| types: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --dev --verbose --all-extras | |
| - name: Copy stubs into place | |
| run: cp -r .venv/lib/python$(cat .python-version)/site-packages/evalio/_cpp python/evalio | |
| - name: Run basedpyright | |
| run: uv run basedpyright | |
| # check cpp formatting | |
| clang-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - uses: jidicula/clang-format-action@v4.14.0 | |
| name: Clang-Format | |
| with: | |
| clang-format-version: '20' | |
| # Make sure docs can be built and deploy if on master branch | |
| docs: | |
| runs-on: ubuntu-latest | |
| env: | |
| UV_NO_EDITABLE: true | |
| VCPKG_BINARY_SOURCES: ${{ vars.VCPKG_BINARY_SOURCES }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_ENDPOINT_URL: ${{ secrets.AWS_ENDPOINT_URL }} | |
| # only required until R2 supports CRC64NVME checksums | |
| # https://community.cloudflare.com/t/an-error-occurred-internalerror-when-calling-the-putobject-operation/764905/11 | |
| AWS_REQUEST_CHECKSUM_CALCULATION: when_required | |
| AWS_RESPONSE_CHECKSUM_VALIDATION: when_required | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| with: | |
| fetch-depth: 0 | |
| # Setup C++ dependencies | |
| - run: ./cpp/setup_pipelines.sh | |
| name: Clone pipelines & vcpkg | |
| # Setup Python dependencies | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install the project | |
| run: uv sync --dev --verbose | |
| # - name: Setup tmate session | |
| # uses: mxschmitt/action-tmate@v3 | |
| # with: | |
| # detached: true | |
| # Setup git | |
| - name: Configure Git user | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| # Finally, deploy docs | |
| # Only update latest if this is a push to master | |
| - name: Deploy docs | |
| if: ${{ github.event_name == 'push' }} | |
| run: uv run mike deploy --push --update-aliases latest | |
| # run tests on both mac and ubuntu, across all python versions | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| UV_NO_EDITABLE: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --dev --verbose | |
| - name: Run tests | |
| run: uv run pytest -v | |
| # make sure everything still builds, but only one python per system | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| env: | |
| VCPKG_BINARY_SOURCES: ${{ vars.VCPKG_BINARY_SOURCES }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_ENDPOINT_URL: ${{ secrets.AWS_ENDPOINT_URL }} | |
| # only required until R2 supports CRC64NVME checksums | |
| # https://community.cloudflare.com/t/an-error-occurred-internalerror-when-calling-the-putobject-operation/764905/11 | |
| AWS_REQUEST_CHECKSUM_CALCULATION: when_required | |
| AWS_RESPONSE_CHECKSUM_VALIDATION: when_required | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: Checkout | |
| # Do all the building | |
| - run: ./cpp/setup_pipelines.sh | |
| name: Clone pipelines & vcpkg | |
| - uses: pypa/cibuildwheel@v2.23.0 | |
| name: Build wheel | |
| env: | |
| # install openmp stuff for mac | |
| CIBW_BEFORE_ALL_MACOS: > | |
| curl -O https://mac.r-project.org/openmp/openmp-19.1.0-darwin20-Release.tar.gz && | |
| sudo tar fvxz openmp-19.1.0-darwin20-Release.tar.gz -C / | |
| # install aws cli for vcpkg caching | |
| CIBW_BEFORE_ALL_LINUX: > | |
| yum -y install curl zip unzip tar && | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && | |
| unzip awscliv2.zip && | |
| ./aws/install | |
| CIBW_BUILD: "cp311-manylinux_x86_64 cp311-macosx_arm64" | |
| CIBW_ENVIRONMENT_PASS_LINUX: VCPKG_BINARY_SOURCES AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_ENDPOINT_URL AWS_REQUEST_CHECKSUM_CALCULATION AWS_RESPONSE_CHECKSUM_VALIDATION | |
| # save artifacts for testing | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| # - name: Setup tmate session | |
| # uses: mxschmitt/action-tmate@v3 | |
| # with: | |
| # detached: true |