Skip to content

Commit

Permalink
build: add ubuntu and osx builds
Browse files Browse the repository at this point in the history
  • Loading branch information
idc101 committed Sep 20, 2023
1 parent 0ac6b17 commit 2fd9c7f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 14 deletions.
67 changes: 53 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,90 @@ on:
- master

jobs:

build:

strategy:
matrix:
targetplatform: [x64]

build-on-windows:
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: Build with SBT
run: sbt assembly

- name: Generate native image
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-*.exe
build-on-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- 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: Build
run: ./build.sh
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target/scala-2.12/git-mkver-*
build-on-mac-x64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- 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: Build
run: ./build.sh
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target/scala-2.12/git-mkver-*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target/
.idea/
_site/
.bsp/

0 comments on commit 2fd9c7f

Please sign in to comment.