Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Implement GitHub Action for building native artifacts on PR builds #13

Merged
merged 1 commit into from
Dec 12, 2023
Merged
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
68 changes: 68 additions & 0 deletions .github/workflows/pr-build-native.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "[PR] Build native binaries"
on:
pull_request:
branches:
- main
types: [opened, synchronize]
jobs:
build:
name: Build kubectl-kport and kport-ide-server native binaries on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest,windows-latest,ubuntu-latest]
steps:
- uses: actions/checkout@v3

- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: '17'
components: "native-image"
github-token: ${{ github.token }}
native-image-job-reports: 'false'

- name: Build All on ${{ matrix.os }}
run: |
mvn clean install -DskipTests -Dnative

- name: Upload kubectl for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: kubectl-kport-${{ runner.os }}.exe
path: kubectl-kport/target/kubectl-kport.exe
retention-days: 1

- name: Upload kport-ide-server for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: kport-ide-server-${{ runner.os }}.exe
path: kport-ide-server/target/kport-ide-server.exe
retention-days: 1

- name: Upload kubectl
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: kubectl-kport-${{ runner.os }}
path: kubectl-kport/target/kubectl-kport
retention-days: 1

- name: Upload kport-ide-server
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ github.token }}
with:
name: kport-ide-server-${{ runner.os }}
path: kport-ide-server/target/kport-ide-server
retention-days: 1

Loading