Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/bazel_version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"6.5.0"
]

4 changes: 0 additions & 4 deletions .github/platform_environment_setup/rhel9/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ description: 'Sets up analyzers, CodeChecker and Bazel for rhel9 CI runner'
runs:
using: "composite"
steps:
- name: Set bazel version to 6.5.0
run: echo "6.5.0" > .bazelversion
shell: bash

- name: Install CodeChecker analyzers
run: |
dnf update -y && \
Expand Down
4 changes: 0 additions & 4 deletions .github/platform_environment_setup/ubuntu/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ description: 'Sets up analyzers, CodeChecker and Bazel for ubuntu CI runner'
runs:
using: "composite"
steps:
- name: Set bazel version to 6.5.0
run: echo "6.5.0" > .bazelversion
shell: bash

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.15.0

Expand Down
35 changes: 33 additions & 2 deletions .github/workflows/foss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,29 @@ concurrency:

jobs:
# TODO: Parallelize the running of projects
load_versions:
name: "Load bazel versions for FOSS tests"
runs-on: ubuntu-24.04
outputs:
bazel_version: ${{ steps.generate_matrix.outputs.matrix_json }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Load versions
id: generate_matrix
run: |
JSON=$(jq -c . ./.github/bazel_version.json)
echo "matrix_json=$JSON" >> $GITHUB_OUTPUT

foss_ubuntu_test:
name: "Test rules on FOSS projects (ubuntu)"
name: "Test rules on FOSS projects Bazel: ${{ matrix.bazel_version }} (ubuntu)"
runs-on: ubuntu-24.04
needs: load_versions
strategy:
fail-fast: false
matrix:
bazel_version: ${{ fromJson(needs.load_versions.outputs.bazel_version) }}

steps:
- name: Checkout repository
Expand All @@ -36,14 +56,22 @@ jobs:
- name: Setup environment
uses: ./.github/platform_environment_setup/ubuntu

- name: Set Bazel version
run: echo ${{ matrix.bazel_version }} >> test/foss/templates/.bazelversion

- name: Run Test On Opensource Projects
working-directory: test
run: python3 -m unittest foss/test_foss.py -vvv

foss_rhel_test:
name: "Test rules on FOSS projects (RHEL)"
name: "Test rules on FOSS projects Bazel ${{ matrix.bazel_version }} (RHEL)"
runs-on: ubuntu-24.04
container: redhat/ubi9:latest
needs: load_versions
strategy:
fail-fast: false
matrix:
bazel_version: ${{ fromJson(needs.load_versions.outputs.bazel_version) }}

steps:
- name: Checkout repository
Expand All @@ -52,6 +80,9 @@ jobs:
- name: Setup environment
uses: ./.github/platform_environment_setup/rhel9

- name: Set Bazel version
run: echo ${{ matrix.bazel_version }} >> test/foss/templates/.bazelversion

- name: Run Test On Opensource Projects
working-directory: test
run: python3 -m unittest foss/test_foss.py -vvv
37 changes: 35 additions & 2 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,38 @@ concurrency:
cancel-in-progress: true

jobs:
load_versions:
name: "Load bazel versions for Unit tests"
runs-on: ubuntu-24.04
outputs:
bazel_version: ${{ steps.generate_matrix.outputs.matrix_json }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Load versions
id: generate_matrix
run: |
JSON=$(jq -c . ./.github/bazel_version.json)
echo "matrix_json=$JSON" >> $GITHUB_OUTPUT

ubuntu_test:
name: Unit tests on ubuntu
name: "Unit tests: Bazel ${{ matrix.bazel_version }} (Ubuntu)"
runs-on: ubuntu-24.04
needs: load_versions
strategy:
fail-fast: false
matrix:
bazel_version: ${{ fromJson(needs.load_versions.outputs.bazel_version) }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set bazel version to ${{ matrix.bazel_version }}
run: echo "${{ matrix.bazel_version }}" > .bazelversion
shell: bash

- name: Setup environment
uses: ./.github/platform_environment_setup/ubuntu

Expand All @@ -50,14 +74,23 @@ jobs:
python3 -m unittest discover unit -vvv

rhel9_test:
name: Unit tests on RHEL9
name: "Unit tests: Bazel ${{ matrix.bazel_version }} (RHEL9)"
runs-on: ubuntu-24.04
container: redhat/ubi9:latest
needs: load_versions
strategy:
fail-fast: false
matrix:
bazel_version: ${{ fromJson(needs.load_versions.outputs.bazel_version) }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set bazel version to ${{ matrix.bazel_version }}
run: echo "${{ matrix.bazel_version }}" > .bazelversion
shell: bash

- name: Setup environment
uses: ./.github/platform_environment_setup/rhel9

Expand Down