From 835c7691a17d5197d35f0db68d1d8c5c7be9b7ab Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 17 Jan 2025 15:25:20 +0530 Subject: [PATCH 1/4] ci: build for all release targets to ensure PRs are compatible --- .github/workflows/build.yaml | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..0b821e89c --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,73 @@ +on: + pull_request: + paths-ignore: + - "docs/**" + - "helm/**" + - "assets/**" + - "**.md" + push: + branches: + - main + +name: Ensure parseable builds on all release targets +jobs: + build-linux: + name: Build for ${{matrix.target}} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: + - aarch64-unknown-linux-gnu # linux(arm) + - x86_64-unknown-linux-gnu # linux(64 bit) + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal # minimal component installation (ie, no documentation) + target: ${{ matrix.target }} + override: true + + - name: Build on ${{ matrix.target }} + run: cargo build --target ${{ matrix.target }} + + build-windows: + name: Build for ${{matrix.target}} + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal # minimal component installation (ie, no documentation) + default: true + override: true + + - name: Build on windows + run: cargo build --target x86_64-pc-windows-msvc + + build-macos: + name: Build for ${{matrix.target}} + runs-on: macos-latest + strategy: + matrix: + target: + - aarch64-apple-darwin # macos(arm) + - x86_64-apple-darwin # macos(intel 64 bit) + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + target: ${{ matrix.target }} + override: true + + - name: Build on ${{ matrix.target }} + run: cargo build --target ${{ matrix.target }} From 91e40b8cd3bf4620c3664d00dcf36ea83b29927d Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 17 Jan 2025 15:28:41 +0530 Subject: [PATCH 2/4] ci: name of job --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0b821e89c..cf98843d1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,7 +35,7 @@ jobs: run: cargo build --target ${{ matrix.target }} build-windows: - name: Build for ${{matrix.target}} + name: Build for windows runs-on: windows-latest steps: From 857b40182097fc8b46050a413c1e18be6ae9dec6 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 17 Jan 2025 15:31:47 +0530 Subject: [PATCH 3/4] ci: use cargo cross for linux-arm --- .github/workflows/build.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cf98843d1..344b99b7e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,8 +31,11 @@ jobs: target: ${{ matrix.target }} override: true - - name: Build on ${{ matrix.target }} - run: cargo build --target ${{ matrix.target }} + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --profile release-lto --target ${{matrix.target}} build-windows: name: Build for windows From c50cadaa912a5f606f34dae9d0519341a502d6b3 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 17 Jan 2025 16:00:02 +0530 Subject: [PATCH 4/4] only debug build Signed-off-by: Devdutt Shenoi --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 344b99b7e..5802a1a1c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,7 +35,7 @@ jobs: with: use-cross: true command: build - args: --profile release-lto --target ${{matrix.target}} + args: --target ${{matrix.target}} build-windows: name: Build for windows