diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..b96072d2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,133 @@ +name: CI + +on: + push: + branches: [bcr-5.3.0] + pull_request: + branches: [bcr-5.3.0] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + bazel_version: ["7.x", "8.x", "9.x", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.14.0 + with: + bazelisk-cache: true + repository-cache: true + - name: Build + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel build //... + - name: Test + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel test //... + + prof-libunwind: + name: Prof libunwind (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04] + bazel_version: ["7.x", "8.x", "9.x", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.14.0 + with: + bazelisk-cache: true + repository-cache: true + - name: Build + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel build //... --config=prof-libunwind + - name: Test + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel test //... --config=prof-libunwind + + prof-libgcc: + name: Prof libgcc (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + bazel_version: ["7.x", "8.x", "9.x", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.14.0 + with: + bazelisk-cache: true + repository-cache: true + - name: Build + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel build //... --config=prof-libgcc + - name: Test + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel test //... --config=prof-libgcc ${{ startsWith(matrix.os, 'macos') && '-- -//test/unit:prof_gdump' || '' }} + + prof-gcc: + name: Prof gcc (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + bazel_version: ["7.x", "8.x", "9.x", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.14.0 + with: + bazelisk-cache: true + repository-cache: true + - name: Build + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel build //... --config=prof-gcc + - name: Test + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + run: bazel test //... --config=prof-gcc ${{ startsWith(matrix.os, 'macos') && '-- -//test/unit:prof_gdump' || '' }} + + examples: + name: Examples (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + bazel_version: ["7.x", "8.x", "9.x", "latest"] + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.14.0 + with: + bazelisk-cache: true + repository-cache: true + - name: Build + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + working-directory: examples + run: bazel build //... + - name: Test + env: + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} + working-directory: examples + run: bazel test //... diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..25f60779 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish to BCR + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag_name: + description: "Git tag to publish (e.g. 5.3.0-bcr.1)" + required: true + type: string + +jobs: + publish: + uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v2 + with: + tag_name: ${{ inputs.tag_name || github.ref_name }} + registry_fork: sallustfire/bazel-central-registry + draft: true + attest: false + permissions: + contents: read + secrets: + publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}