Skip to content

try to control the memory usage of mac arm64 #11

try to control the memory usage of mac arm64

try to control the memory usage of mac arm64 #11

Workflow file for this run

name: Build and Run
on:
push:
branches: [ carlos-ci ]
pull_request:
branches: [ carlos-ci ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
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: |
sudo swapoff -a
sudo fallocate -l 15G /swapfile
sudo chmod 600 /swapfile
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
run: java -cp target/classes com.example.YourMainClass