feat: Add user config support #459
Workflow file for this run
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: Pull Request Stackablectl | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/pr_stackablectl.yml" | |
| - "docs/modules/stackablectl/**" | |
| - "rust/stackable-cockpit/**" | |
| - "rust/stackablectl/**" | |
| - "rust/helm-sys/**" | |
| - "Cargo.lock" | |
| - "go.sum" | |
| - "extra/**" | |
| env: | |
| RUST_VERSION: 1.87.0 | |
| GO_VERSION: '^1.22.5' | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: "0" | |
| CARGO_PROFILE_DEV_DEBUG: "0" | |
| RUSTFLAGS: "-D warnings" | |
| RUSTDOCFLAGS: "-D warnings" | |
| RUST_LOG: "info" | |
| jobs: | |
| general-checks: | |
| name: General Pull Request Checks | |
| uses: ./.github/workflows/pr_general.yml | |
| build: | |
| name: Build stackablectl for ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - general-checks | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # We intentionally don't use ubuntu-latest because we want to build against an old glibc version. | |
| # (18.04 has glibc 2.27, 20.04 has glibc 2.31, 22.04 has glibc 2.35, 24.04 has glibc 2.39). | |
| # | |
| # A Rust binary will only run on systems that have the same or a newer glibc version! | |
| # By building on a "modern" version we break the pre-build binaries for everyone that isn't | |
| # (e.g. debian is normally behind Ubuntu). | |
| # | |
| # To achieve this we pick the oldest Ubuntu version that works out of the box. | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-22.04 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-22.04-arm | |
| # Technically it would be better to pin this versions, but so far this didn't cause any problems | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
| with: | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1 | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| targets: ${{ matrix.target }} | |
| - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 | |
| with: | |
| key: build-stackablectl-${{ matrix.target }} | |
| - name: Build for non-Windows | |
| if: matrix.os != 'windows-latest' | |
| run: cargo build --target ${{ matrix.target }} -p stackablectl | |
| - name: Ensure shell completions up-to-date | |
| if: matrix.os == 'x86_64-unknown-linux-gnu' | |
| run: | | |
| cargo xtask gen-comp | |
| git diff --exit-code | |
| - name: Ensure man page is up-to-date | |
| if: matrix.os == 'x86_64-unknown-linux-gnu' | |
| run: | | |
| cargo xtask gen-man | |
| git diff --exit-code |