forked from rook/rook
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v7...v7.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
94 lines
2.7 KiB
YAML
94 lines
2.7 KiB
YAML
name: Builds
|
|
on:
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
|
|
shell: bash --noprofile --norc -eo pipefail -x {0}
|
|
|
|
# cancel the in-progress workflow when PR is refreshed.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
macos-build:
|
|
runs-on: macos-latest
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
|
with:
|
|
go-version: "1.26"
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
|
with:
|
|
version: v3.18.2
|
|
|
|
- name: build rook
|
|
run: |
|
|
GOPATH=$(go env GOPATH) make clean && make -j"$nproc" BUILD_CONTAINER_IMAGE=false build
|
|
|
|
- name: validate build
|
|
run: tests/scripts/validate_modified_files.sh build
|
|
|
|
- name: run codegen
|
|
run: GOPATH=$(go env GOPATH) make codegen
|
|
|
|
- name: validate codegen
|
|
run: tests/scripts/validate_modified_files.sh codegen
|
|
|
|
- name: run mod check
|
|
run: GOPATH=$(go env GOPATH) make -j"$(nproc)" mod.check
|
|
|
|
- name: validate modcheck
|
|
run: tests/scripts/validate_modified_files.sh modcheck
|
|
|
|
- name: run crds-gen
|
|
run: GOPATH=$(go env GOPATH) make crds
|
|
|
|
- name: validate crds-gen
|
|
run: tests/scripts/validate_modified_files.sh crd
|
|
|
|
- name: run gen-rbac
|
|
run: GOPATH=$(go env GOPATH) make gen-rbac
|
|
|
|
- name: validate gen-rbac
|
|
run: tests/scripts/validate_modified_files.sh gen-rbac
|
|
|
|
linux-build-all:
|
|
runs-on: ubuntu-22.04
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'skip-ci')"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version: ["1.26"]
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: setup golang ${{ matrix.go-version }}
|
|
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: set up QEMU
|
|
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # master
|
|
with:
|
|
platforms: all
|
|
|
|
- name: build.all rook with go ${{ matrix.go-version }}
|
|
run: |
|
|
tests/scripts/github-action-helper.sh build_rook_all
|