Skip to content

Commit

Permalink
only run the code on macos (only one that will work)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m authored Jun 17, 2024
1 parent a9ce61c commit 1ebf0a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/build-and-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:
with:
java-version: '11'
distribution: 'adopt'

- name: Install openCL on Ubuntu
if: runner.os == 'Linux'
run: sudo apt install ocl-icd-opencl-dev

- name: Increase swapfile on Ubuntu
if: runner.os == 'Linux'
run: |
Expand All @@ -34,16 +36,19 @@ jobs:
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
- name: Build with Maven on x86_64 based hosts
if: matrix.os != 'macos-14'
run: sudo mvn clean install

- name: Build with Maven on arm64 host (memory constrained)
if: matrix.os == 'macos-14'
run: |
export MAVEN_OPTS="-Xmx6g -XX:+UseG1GC"
mvn clean install
- name: Run Java class
- name: Run Java class (only possible on MacOS)
if: contains(matrix.os, 'macos')
run: |
mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt
java -cp target/classes:$(cat classpath.txt) net.clesperanto.ClesperantoJ

0 comments on commit 1ebf0a1

Please sign in to comment.