Skip to content

Commit

Permalink
Build add MacOs m1 arm64 support on jdk 1.8 (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
vharseko authored May 7, 2024
1 parent 866558b commit 9f0e9a2
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Java ${{ matrix.Java }} (${{ matrix.os }})
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
distribution: 'zulu'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
Expand All @@ -34,7 +34,7 @@ jobs:
MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
run: mvn --batch-mode --errors --update-snapshots package --file pom.xml
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.java }}
retention-days: 5
Expand All @@ -49,32 +49,32 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Get latest release version
shell: bash
run: |
git fetch -t; export git_version_last="$(git describe --abbrev=0 --tags)" ; echo "last release: $git_version_last"
export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenIG/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
echo "release_version=$git_version_last" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
localhost:5000/${{ github.repository }}
tags: |
type=raw,value=latest
type=raw,value=${{ env.release_version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: ./openig-docker
Expand All @@ -98,32 +98,32 @@ jobs:
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Get latest release version
shell: bash
run: |
git fetch -t; export git_version_last="$(git describe --abbrev=0 --tags)" ; echo "last release: $git_version_last"
export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenIG/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
echo "release_version=$git_version_last" >> $GITHUB_ENV
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
localhost:5000/${{ github.repository }}
tags: |
type=raw,value=alpine
type=raw,value=${{ env.release_version }}-alpine
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: ./openig-docker
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Java for publishing to Maven Central Repository OSS
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
Expand All @@ -55,12 +55,12 @@ jobs:
if: ${{ github.event.workflow_run.event=='push' && env.MAVEN_USERNAME!='' && env.MAVEN_PASSWORD!=''}}
run: mvn --batch-mode --errors --update-snapshots -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy --file pom.xml
- name: Upload artifacts OpenIG Server Only Component
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenIG Server
path: openig-war/target/*.war
- name: Upload artifacts OpenIG Dockerfile
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenIG Dockerfile
path: openig-docker/target/Dockerfile*
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Java for publishing to Maven Central Repository OSS
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
Expand All @@ -59,7 +59,7 @@ jobs:
if: ${{ env.MAVEN_USERNAME!='' && env.MAVEN_PASSWORD!='' }}
run: mvn --batch-mode -Darguments="-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}" -DsignTag=true -DtagNameFormat="${{ github.event.inputs.releaseVersion }}" -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} release:prepare release:perform --file pom.xml
- name: Release on GitHub
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: ${{ github.event.inputs.releaseVersion }}
tag_name: ${{ github.event.inputs.releaseVersion }}
Expand All @@ -75,14 +75,14 @@ jobs:
needs:
- release-maven
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.releaseVersion }}
fetch-depth: 1
submodules: recursive
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
Expand All @@ -91,9 +91,9 @@ jobs:
type=raw,value=latest
type=raw,value=${{ github.event.inputs.releaseVersion }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
Expand All @@ -106,7 +106,7 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: ./openig-docker
Expand All @@ -122,14 +122,14 @@ jobs:
needs:
- release-maven
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.releaseVersion }}
fetch-depth: 1
submodules: recursive
- name: Docker meta (alpine)
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
Expand All @@ -138,9 +138,9 @@ jobs:
type=raw,value=alpine
type=raw,value=${{ github.event.inputs.releaseVersion }}-alpine
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
Expand All @@ -154,7 +154,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
continue-on-error: true
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./openig-docker
file: ./openig-docker/Dockerfile-alpine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public Promise<Response, NeverThrowsException> filter(final Context context,
public void handleResult(final Response result) {
// Elapsed time is computed in microseconds
long elapsed = TimeUnit.NANOSECONDS.toMicros(System.nanoTime() - start);
metrics.getAccumulatedResponseTime().inc(elapsed);
metrics.getAccumulatedResponseTime().inc(elapsed==0?1:elapsed);
metrics.getResponseTime().update(elapsed);

metrics.getThroughput().mark();
Expand Down
2 changes: 1 addition & 1 deletion openig-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</goals>
<phase>initialize</phase>
<configuration>
<nodeVersion>v10.16.3</nodeVersion>
<nodeVersion>v20.12.2</nodeVersion>
<npmVersion>6.12.0</npmVersion>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
<dependency>
<groupId>org.openidentityplatform.openam</groupId>
<artifactId>openam</artifactId>
<version>14.8.3</version>
<version>14.8.5-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down

0 comments on commit 9f0e9a2

Please sign in to comment.