From d4189c71bc80e45def9e437533a8d842158726a5 Mon Sep 17 00:00:00 2001 From: Iain Cardnell Date: Wed, 26 Apr 2023 20:17:12 +0100 Subject: [PATCH] chore: add windows ci build --- .github/workflows/ci.yml | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..962e036 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,71 @@ +name: Git Mkver Build + +# Trigger on every master branch push and pull request +on: + push: + branches: + - master + - patch-* + - ci-build + pull_request: + branches: + - master + +jobs: + + build: + + strategy: + matrix: + targetplatform: [x64] + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v3 + + - uses: actions/setup-java@v3 + with: + distribution: 'oracle' + java-version: '19' + cache: 'sbt' + + - uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '19' + components: 'native-image' + # github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + +# - name: Install SBT +# uses: olafurpg/setup-scala@v11 +# with: +# sbt-version: '1.8.2' + + - name: Build with SBT + run: sbt assembly + +# - name: Compile +# shell: bash +# run: sbt assembly + + - name: Compile + shell: bash + run: | + pushd target/scala-2.12 + native-image -jar $(ls -1 git-mkver-assembly-*.jar) --no-fallback + popd + + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: git-mkver + path: target\scala-2.12\git-mkver-*