Skip to content

Commit

Permalink
#26918 Sign the QEMU binary to fix colima starting issue. +24.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolina committed Dec 27, 2023
1 parent a6f83dc commit 2568456
Showing 1 changed file with 95 additions and 93 deletions.
188 changes: 95 additions & 93 deletions .github/workflows/cli-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ macos-12 ] # macos-13-xlarge, macOS-latest
os: [ macos-13 ] # macos-13-xlarge, macOS-latest
runs-on: ${{ matrix.os }}
steps:
- name: 'Install colima, docker and docker-compose'
run: |
brew install qemu
curl -o ./qemu.rb https://github.com/Homebrew/homebrew-core/blob/master/Formula/q/qemu.rb
brew install ./qemu.rb
brew install docker docker-compose
mkdir -p ~/.docker/cli-plugins
Expand All @@ -110,97 +112,97 @@ jobs:
# /opt/homebrew/opt/colima/bin/colima start -f
# sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock

- name: 'Log docker context'
run: |
colima status
colima version
docker context list
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ needs.precheck.outputs.HEAD }}
fetch-depth: 0

- name: 'Set up GraalVM for macOS ${{ matrix.os }}'
if: ${{ contains(matrix.os, 'macos') }}
run: |
if [ "${{ matrix.os }}" == "macos-13-xlarge" ]; then
echo "Setting GraalVM on macos-13-xlarge"
ARCH=aarch64
else
echo "Setting GraalVM on macOS-latest"
ARCH=amd64
fi
wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-java11-darwin-${ARCH}-${{ env.GRAALVM_VERSION }}.tar.gz
tar -xzf graalvm-ce-java11-darwin-${ARCH}-${{ env.GRAALVM_VERSION }}.tar.gz
sudo mv graalvm-ce-java11-${{ env.GRAALVM_VERSION }} /Library/Java/JavaVirtualMachines
ls -la /Library/Java/JavaVirtualMachines
sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-${{ env.GRAALVM_VERSION }}/Contents/Home
GRAALVM_HOME="/Library/Java/JavaVirtualMachines/graalvm-ce-java11-${{ env.GRAALVM_VERSION }}/Contents/Home"
echo "GRAALVM_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
echo "JAVA_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
PATH="$GRAALVM_HOME/bin:$PATH"
echo "PATH=$PATH" >> $GITHUB_ENV
gu install native-image
- name: 'Checking GraalVM setup'
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: 'Cache Maven packages'
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: 'Prepare dotCMS license'
env:
DOTCMS_LICENSE_KEY: ${{ secrets.DOTCMS_LICENSE }}
run: |
DOTCMS_LICENSE_PATH=${GITHUB_WORKSPACE}/tools/dotcms-cli/license
mkdir -p ${DOTCMS_LICENSE_PATH}
echo "${DOTCMS_LICENSE_KEY}" > ${DOTCMS_LICENSE_PATH}/license.dat
echo "DOTCMS_LICENSE_FILE=${DOTCMS_LICENSE_PATH}/license.dat" >> "$GITHUB_ENV"
- name: 'Compile and install packaged artifacts'
working-directory: ${{ github.workspace }}
run: |
./mvnw clean install -Dtest.failure.ignore=true -DskipTests=${{ github.event.inputs.skipTests }} -am -pl :dotcms-cli
- name: 'Build uber-jar'
working-directory: ${{ github.workspace }}
run: |
./mvnw package -Dquarkus.package.type=uber-jar -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli
- name: 'Testing native image'
working-directory: ${{ github.workspace }}
env:
DOTCMS_IMAGE: dotcms/dotcms:master_latest_SNAPSHOT
run: |
echo "${DOTCMS_IMAGE}"
echo "${DOTCMS_LICENSE_FILE}"
./mvnw verify -Dnative -pl :dotcms-cli
- name: 'Build Native Image'
if: ${{ success() }}
working-directory: ${{ github.workspace }}
run: |
./mvnw package -Pnative -DskipTests=true -pl :dotcms-cli
- name: 'Create distribution'
if: ${{ success() }}
working-directory: ${{ github.workspace }}
run: |
./mvnw -B -ntp -Pdist package -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli
# - name: 'Log docker context'
# run: |
# colima status
# colima version
# docker context list
#
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# ref: ${{ needs.precheck.outputs.HEAD }}
# fetch-depth: 0
#
# - name: 'Set up GraalVM for macOS ${{ matrix.os }}'
# if: ${{ contains(matrix.os, 'macos') }}
# run: |
# if [ "${{ matrix.os }}" == "macos-13-xlarge" ]; then
# echo "Setting GraalVM on macos-13-xlarge"
# ARCH=aarch64
# else
# echo "Setting GraalVM on macOS-latest"
# ARCH=amd64
# fi
#
# wget https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-java11-darwin-${ARCH}-${{ env.GRAALVM_VERSION }}.tar.gz
# tar -xzf graalvm-ce-java11-darwin-${ARCH}-${{ env.GRAALVM_VERSION }}.tar.gz
# sudo mv graalvm-ce-java11-${{ env.GRAALVM_VERSION }} /Library/Java/JavaVirtualMachines
#
# ls -la /Library/Java/JavaVirtualMachines
#
# sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-${{ env.GRAALVM_VERSION }}/Contents/Home
#
# GRAALVM_HOME="/Library/Java/JavaVirtualMachines/graalvm-ce-java11-${{ env.GRAALVM_VERSION }}/Contents/Home"
# echo "GRAALVM_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# echo "JAVA_HOME=$GRAALVM_HOME" >> $GITHUB_ENV
# PATH="$GRAALVM_HOME/bin:$PATH"
# echo "PATH=$PATH" >> $GITHUB_ENV
# gu install native-image
#
# - name: 'Checking GraalVM setup'
# run: |
# echo "GRAALVM_HOME: $GRAALVM_HOME"
# echo "JAVA_HOME: $JAVA_HOME"
# java --version
# native-image --version
#
# - name: 'Cache Maven packages'
# uses: actions/cache@v3
# with:
# path: ~/.m2/repository
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-maven-
#
# - name: 'Prepare dotCMS license'
# env:
# DOTCMS_LICENSE_KEY: ${{ secrets.DOTCMS_LICENSE }}
# run: |
# DOTCMS_LICENSE_PATH=${GITHUB_WORKSPACE}/tools/dotcms-cli/license
# mkdir -p ${DOTCMS_LICENSE_PATH}
# echo "${DOTCMS_LICENSE_KEY}" > ${DOTCMS_LICENSE_PATH}/license.dat
# echo "DOTCMS_LICENSE_FILE=${DOTCMS_LICENSE_PATH}/license.dat" >> "$GITHUB_ENV"
#
# - name: 'Compile and install packaged artifacts'
# working-directory: ${{ github.workspace }}
# run: |
# ./mvnw clean install -Dtest.failure.ignore=true -DskipTests=${{ github.event.inputs.skipTests }} -am -pl :dotcms-cli
#
# - name: 'Build uber-jar'
# working-directory: ${{ github.workspace }}
# run: |
# ./mvnw package -Dquarkus.package.type=uber-jar -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli
#
# - name: 'Testing native image'
# working-directory: ${{ github.workspace }}
# env:
# DOTCMS_IMAGE: dotcms/dotcms:master_latest_SNAPSHOT
# run: |
# echo "${DOTCMS_IMAGE}"
# echo "${DOTCMS_LICENSE_FILE}"
# ./mvnw verify -Dnative -pl :dotcms-cli
#
# - name: 'Build Native Image'
# if: ${{ success() }}
# working-directory: ${{ github.workspace }}
# run: |
# ./mvnw package -Pnative -DskipTests=true -pl :dotcms-cli
#
# - name: 'Create distribution'
# if: ${{ success() }}
# working-directory: ${{ github.workspace }}
# run: |
# ./mvnw -B -ntp -Pdist package -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli

## - name: 'Distribution tree'
## working-directory: ${{ github.workspace }}/tools/dotcms-cli/
Expand Down

0 comments on commit 2568456

Please sign in to comment.