Skip to content

v1.12.3.1577

v1.12.3.1577 #16

Workflow file for this run

name: build-windows
on: [push, pull_request]
jobs:
native:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
include:
- os: windows-2022
name: windows
static: false
runs-on: ${{ matrix.os }}
env:
LEIN_ROOT: "true"
GRAALVM_VERSION: "24"
BABASHKA_PLATFORM: ${{ matrix.name }} # used in release script
BABASHKA_TEST_ENV: native
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BABASHKA_SHA: ${{ github.sha }}
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
submodules: 'true'
- name: Cache deps
uses: actions/cache@v4
id: cache-deps
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('project.clj') }}
restore-keys: ${{ runner.os }}-maven-
- name: Setup GraalVM
if: "matrix.static == false"
uses: graalvm/[email protected]
with:
java-version: '24'
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: latest
bb: latest
# lein: latest -- skipped because this uses some PS bullshit
- name: Babashka version
id: deps-clj-version
shell: bash
run: |
DEPS_CLJ_VERSION=$(cat resources/DEPS_CLJ_VERSION)
echo "##[set-output name=version;]${DEPS_CLJ_VERSION}"
- name: Build
shell: cmd
run: |
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat', 'lein.bat')"
call lein self-install
set /P DEPS_CLJ_VERSION=< resources\DEPS_CLJ_VERSION
set GRAALVM_HOME=%JAVA_HOME%
call lein do clean, uberjar
bb compile
echo Creating zip archive
set ARTIFACT=deps.clj-%DEPS_CLJ_VERSION%-windows-amd64.zip
jar -cMf %ARTIFACT% deps.exe
bb upload-artifact :file %ARTIFACT%
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: deps.exe
name: deps.clj-${{ steps.deps-clj-version.outputs.version }}-${{ matrix.name }}-amd64
- name: Test binary and libs
shell: cmd
run: |
bb exe-test