2020-12-01 16:00:44 +00:00
|
|
|
name: Build tests
|
|
|
|
|
2020-12-08 17:31:00 +00:00
|
|
|
on: [push, pull_request]
|
2020-12-01 16:00:44 +00:00
|
|
|
|
|
|
|
env:
|
2024-02-23 21:12:25 +00:00
|
|
|
# Minimum versions to build refpolicy.
|
|
|
|
PYTHON_VERSION: "3.10"
|
2024-06-18 16:59:12 +00:00
|
|
|
SELINUX_USERSPACE_VERSION: "3.2"
|
2024-02-23 21:12:25 +00:00
|
|
|
# branch for sechecker
|
|
|
|
SECHECKER_VERSION: "4.4"
|
2024-06-18 16:59:12 +00:00
|
|
|
# branch for selint
|
|
|
|
SELINT_VERSION: "v1.5.0"
|
2020-12-01 16:00:44 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-06-18 16:59:12 +00:00
|
|
|
lint_branch_policy:
|
|
|
|
uses: ./.github/workflows/lint-policy.yml
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
selint-version: "v1.5.0"
|
|
|
|
|
|
|
|
build_userspace:
|
|
|
|
uses: ./.github/workflows/build-userspace.yml
|
|
|
|
# depend on lint so expensive operations don't run if lint fails
|
|
|
|
needs: lint_branch_policy
|
|
|
|
with:
|
|
|
|
version: "3.2"
|
|
|
|
|
|
|
|
build_setools:
|
|
|
|
uses: ./.github/workflows/build-setools.yml
|
|
|
|
needs: build_userspace
|
|
|
|
with:
|
|
|
|
version: "4.4"
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
build_branch_policy:
|
|
|
|
uses: ./.github/workflows/build-policy.yml
|
|
|
|
needs: build_userspace
|
|
|
|
with:
|
|
|
|
# Minimum versions to build refpolicy.
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
validate_branch_policy:
|
|
|
|
uses: ./.github/workflows/validate-policy.yml
|
|
|
|
needs: [build_branch_policy, build_setools, build_userspace]
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
2020-12-01 16:00:44 +00:00
|
|
|
|
2024-06-27 13:02:20 +00:00
|
|
|
build_PRtarget_policy:
|
|
|
|
uses: ./.github/workflows/build-policy.yml
|
|
|
|
needs: build_userspace
|
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
|
|
with:
|
|
|
|
version: ${{ github.base_ref }}
|
|
|
|
artifact-name: "PRbase"
|
|
|
|
python-version: "3.10"
|
|
|
|
|
|
|
|
diff_policy:
|
|
|
|
uses: ./.github/workflows/diff-policy.yml
|
|
|
|
needs: [build_branch_policy, build_PRtarget_policy, build_setools, build_userspace]
|
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
|
|
with:
|
|
|
|
left: "PRbase"
|
|
|
|
right: "refpolicy"
|
|
|
|
python-version: "3.10"
|