Skip to content

Commit

Permalink
chore: add windows ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
idc101 committed Apr 26, 2023
1 parent 5a87124 commit 41f8f5f
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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: 'temurin'
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: Generate native image
#shell: bash
run: |
cd target\scala-2.12
$TEST = Get-ChildItem git-mkver-assembly-*.jar | Select-Object -ExpandProperty Name
native-image -jar $TEST --no-fallback
cd ..\..\
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target\scala-2.12\git-mkver-*

0 comments on commit 41f8f5f

Please sign in to comment.