Skip to content

Commit

Permalink
SERV_1012 Pulled from Janhoy's repository to allow builds on Mac and …
Browse files Browse the repository at this point in the history
…testing Mac runner
  • Loading branch information
angelahuqing committed Jan 31, 2024
1 parent dfd0284 commit 7144327
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Maven PR Build

# We require all commits go through PR on GitHub
on:
pull_request:
push:
branches:
- main
- SERV-1012

jobs:
build:
name: Maven PR Builder (JDK ${{ matrix.java }} with ${{ matrix.build_property }})
runs-on: ubuntu-latest
runs-on: macos-14
strategy:
matrix:
java: [ 11, 17 ]
build_property: [ "kakadu.version", "ignored.version" ]
build_property: ["ignored.version"]

steps:
- name: Check out code
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ To apply your own patches to the Cantaloupe source, create patchfiles with a Git

Patching an older version of Cantaloupe is possible as well.

To use Docker buildkit (builx), supply the list of architectures to build:

mvn verify -Ddocker.platforms=linux/amd64,linux/arm64

_Hint: If you want to run a build without a Docker cache, add `-Ddocker.noCache` to your mvn command; for instance: `mvn verify -Ddocker.noCache`_

### Run the Cantaloupe container
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<docker.cleanup>remove</docker.cleanup>
<docker.image>cantaloupe${artifact.qualifier}</docker.image>
<docker.showLogs>true</docker.showLogs>
<docker.platforms></docker.platforms>

<!-- We don't need to build the jar outside of the Docker build -->
<jar.phase></jar.phase>
Expand Down Expand Up @@ -403,6 +404,12 @@
<name>${docker.image}</name>
<build>
<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
<buildx>
<platforms>
<!-- set comma separated list of platforms in ${docker.platforms} to invoke buildkit -->
<platform>${docker.platforms}</platform>
</platforms>
</buildx>
</build>
<run>
<ports>
Expand Down

0 comments on commit 7144327

Please sign in to comment.