Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Build test on MacOS M1 arm64 #335

Merged
merged 12 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ jobs:
sudo apt install --install-recommends winehq-stable
sudo mkdir -p /opt/wine/mono && sudo wget "https://dl.winehq.org/wine/wine-mono/8.0.0/wine-mono-8.0.0-x86.tar.xz" -P /opt/wine/mono && sudo tar -xf /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz -C /opt/wine/mono && sudo rm /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz
wine --version
- 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 Down Expand Up @@ -85,7 +85,7 @@ jobs:
opendj-server-legacy\target\package\opendj\bat\ldapsearch.bat --hostname localhost --port 1636 --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll --baseDN "dc=example,dc=com" --searchScope sub "(uid=user.*)" dn | find /c '"dn:"' | findstr "5000"
opendj-server-legacy\target\package\opendj\bat\stop-ds.bat
- name: Upload artifacts OpenDJ Server
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.java }}
retention-days: 5
Expand All @@ -108,31 +108,31 @@ 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/OpenDJ/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=${{ 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 (default)
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
continue-on-error: true
with:
context: ./opendj-packages/opendj-docker
Expand All @@ -156,33 +156,33 @@ 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/OpenDJ/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
continue-on-error: true
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./opendj-packages/opendj-docker
file: ./opendj-packages/opendj-docker/Dockerfile-alpine
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ jobs:
sudo apt install --install-recommends winehq-stable
sudo mkdir -p /opt/wine/mono && sudo wget "https://dl.winehq.org/wine/wine-mono/8.0.0/wine-mono-8.0.0-x86.tar.xz" -P /opt/wine/mono && sudo tar -xf /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz -C /opt/wine/mono && sudo rm /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz
wine --version
- 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 @@ -66,52 +66,52 @@ 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 OpenDJ Server
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Server
path: opendj-server-legacy/target/package/*.zip
- name: Upload artifacts OpenDJ SDK Toolkit
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ SDK Toolkit
path: opendj-ldap-toolkit/target/*.zip
- name: Upload artifacts OpenDJ Debian Package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Debian Package
path: opendj-packages/opendj-deb/opendj-deb-standard/target/*.deb
- name: Upload artifacts OpenDJ RPM Package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ RPM Package
path: opendj-packages/opendj-rpm/opendj-rpm-standard/target/rpm/opendj/RPMS/noarch/*.rpm
- name: Upload artifacts OpenDJ MSI Package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ MSI Package
path: opendj-packages/opendj-msi/opendj-msi-standard/target/*.msi
- name: Upload artifacts OpenDJ Docker Packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Docker Packages
path: opendj-packages/opendj-docker/target/Dockerfile.zip
- name: Upload artifacts OpenDJ Openshift template
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Openshift template
path: opendj-packages/opendj-openshift-template/*.yaml
- name: Upload artifacts OpenDJ Doc Generated Reference
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Doc Generated References
path: opendj-doc-generated-ref/target/*.zip
- name: Upload artifacts OpenDJ DSML Gateway
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ DSML Gateway
path: opendj-dsml-servlet/target/*.war
- name: Upload artifacts OpenDJ Commons REST LDAP Gateway
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: OpenDJ Commons REST LDAP Gateway
path: opendj-rest2ldap-servlet/target/*.war
Expand All @@ -120,7 +120,7 @@ jobs:
git config --global user.name "Open Identity Platform Community"
git config --global user.email "[email protected]"
cd ..
- uses: actions/checkout@v3
- uses: actions/checkout@v4
continue-on-error: true
with:
repository: ${{ github.repository }}.wiki
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ jobs:
sudo apt install --install-recommends winehq-stable
sudo mkdir -p /opt/wine/mono && sudo wget "https://dl.winehq.org/wine/wine-mono/8.0.0/wine-mono-8.0.0-x86.tar.xz" -P /opt/wine/mono && sudo tar -xf /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz -C /opt/wine/mono && sudo rm /opt/wine/mono/wine-mono-8.0.0-x86.tar.xz
wine --version
- 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 Down Expand Up @@ -89,7 +89,7 @@ jobs:
opendj-doc-generated-ref/target/*.zip
opendj-dsml-servlet/target/*.war
opendj-rest2ldap-servlet/target/*.war
- uses: actions/checkout@v3
- uses: actions/checkout@v4
continue-on-error: true
with:
repository: ${{ github.repository }}.wiki
Expand All @@ -116,14 +116,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 @@ -132,9 +132,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 @@ -147,7 +147,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: ./opendj-packages/opendj-docker
Expand All @@ -164,14 +164,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 @@ -180,9 +180,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 @@ -196,7 +196,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: ./opendj-packages/opendj-docker
file: ./opendj-packages/opendj-docker/Dockerfile-alpine
Expand Down
Loading