Skip to content

ClojureCLR support #1356

ClojureCLR support

ClojureCLR support #1356

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
env:
ACTIONS_CACHE_VERISON: 0
# TODO: Add the deploy if needed
jobs:
test-jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch_depth: 0
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.763
lein: 2.9.3
bb: 0.8.2
- name: Prepare java
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: '11'
- name: Run JVM tests
run: bb test:jvm
test-clojureclr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '8.0.x'
- name: Install ClojureCLR and cljr
run: |
dotnet tool install --global Clojure.Main --version 1.12.3-alpha3
dotnet tool install --global Clojure.Cljr --version 0.1.0-alpha8
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Restore dependency cache
id: cache-deps
uses: actions/cache/restore@v4
with:
path: |
~/.gitlibs
key: ${{ env.ACTIONS_CACHE_VERSION }}-clr-deps-${{ hashFiles('**/deps-clr.edn') }}
restore-keys: |
${{ env.ACTIONS_CACHE_VERSION }}-clr-deps-
- name: Download dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: cljr -A:test -Stree
- name: Save dependency cache
if: steps.cache-deps.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
~/.gitlibs
key: ${{ env.ACTIONS_CACHE_VERSION }}-clr-deps-${{ hashFiles('**/deps-clr.edn') }}
- name: Run CLR tests
run: ./script/test/clr
test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch_depth: 0
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.763
lein: 2.9.3
bb: 0.8.2
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Prepare java
uses: actions/setup-java@v2
with:
distribution: 'adopt-hotspot'
java-version: '11'
- name: Run node tests
run: bb test:node
test-native:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch_depth: 0
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.763
lein: 2.9.3
bb: 0.8.2
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '21'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run node tests
run: bb test:native
test-self-hosted:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch_depth: 0
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: 1.10.1.763
lein: 2.9.3
bb: 0.8.2
- name: Install planck
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install planck
- name: Run self-hosted tests
run: bb test:self-hosted
test-libsci:
# Compile and test libsci across all OSs.
strategy:
matrix:
# windows-latest is disabled because
# of a Rust bindgen thing
# macos for the same rason now too
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
components: 'native-image'
- name: Install Clojure tools
uses: DeLaGuardo/[email protected]
with:
bb: '1.0.165'
lein: '2.9.10'
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn', 'project.clj') }}
restore-keys: cljdeps-
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Compile libsci and example programs
run: |
bb libsci:compile-all
- name: Test libsci example programs
run: |
bb libsci:test