Skip to content

ci: split out builds #11

ci: split out builds

ci: split out builds #11

Workflow file for this run

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-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: build-windows.cmd
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target\scala-2.12\git-mkver-windows-amd64-*.zip
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-linux.sh
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target/git-mkver-linux-*.tar.gz
build-universal:
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-universal.sh
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target/universal/git-mkver-*.zip
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-macos.sh
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: git-mkver
path: target/git-mkver-darwin-*.tar.gz