feat(math): add finite stochastic processes domain with sigma algebras, conditional expectation, filtrations, and Doob martingales (#1806) #2657
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: Container Image | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| tags: ["jacobian-v*"] | |
| concurrency: | |
| group: container-image-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| PLATFORM: linux/amd64 | |
| jobs: | |
| build-pr: | |
| name: Build container image | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4 | |
| - id: version | |
| name: Read Jacobian package version | |
| run: echo "value=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" >> "$GITHUB_OUTPUT" | |
| - name: Build without publishing | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7 | |
| with: | |
| context: . | |
| platforms: ${{ env.PLATFORM }} | |
| push: false | |
| build-args: | | |
| JACOBIAN_REVISION=${{ github.sha }} | |
| JACOBIAN_VERSION=${{ steps.version.outputs.value }} | |
| JACOBIAN_SOURCE_DIRTY=false | |
| cache-from: type=gha,scope=jacobian-container | |
| cache-to: type=gha,mode=max,scope=jacobian-container | |
| publish: | |
| name: Publish container image | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: version | |
| name: Read Jacobian package version | |
| run: echo "value=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" >> "$GITHUB_OUTPUT" | |
| - id: meta | |
| name: Compute immutable and convenience tags | |
| uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=sha-${{ github.sha }} | |
| type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }} | |
| type=ref,event=tag | |
| labels: | | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.version=${{ steps.version.outputs.value }} | |
| io.jacobian.source-dirty=false | |
| - id: build | |
| name: Build and publish | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7 | |
| with: | |
| context: . | |
| platforms: ${{ env.PLATFORM }} | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| JACOBIAN_REVISION=${{ github.sha }} | |
| JACOBIAN_VERSION=${{ steps.version.outputs.value }} | |
| JACOBIAN_SOURCE_DIRTY=false | |
| cache-from: type=gha,scope=jacobian-container | |
| cache-to: type=gha,mode=max,scope=jacobian-container | |
| provenance: mode=max | |
| sbom: true | |
| - name: Record digest-addressed publication evidence | |
| env: | |
| DIGEST: ${{ steps.build.outputs.digest }} | |
| PACKAGE_VERSION: ${{ steps.version.outputs.value }} | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/jacobian-image" | |
| jq -n \ | |
| --arg source_sha "$GITHUB_SHA" \ | |
| --arg image "$REGISTRY/$IMAGE_NAME@$DIGEST" \ | |
| --arg image_digest "$DIGEST" \ | |
| --arg platform "$PLATFORM" \ | |
| --arg package_version "$PACKAGE_VERSION" \ | |
| '{source_sha: $source_sha, image: $image, image_digest: $image_digest, platform: $platform, jacobian_package_version: $package_version}' \ | |
| > "$RUNNER_TEMP/jacobian-image/image-evidence.json" | |
| cat "$RUNNER_TEMP/jacobian-image/image-evidence.json" >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload publication evidence | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: jacobian-image-${{ github.sha }} | |
| path: ${{ runner.temp }}/jacobian-image/image-evidence.json | |
| if-no-files-found: error | |
| retention-days: 90 |