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

Release binaries: linux amd64, macos amd64, macos aarch64, windows amd64 #1016

Merged
merged 6 commits into from
Jun 13, 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
31 changes: 23 additions & 8 deletions .github/workflows/early-access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
default-build:
name: 'Default build (without Graal)'
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
Expand All @@ -42,7 +42,7 @@ jobs:
distribution: 'temurin'

- name: 'Run default (non-native) build'
run: ./mvnw verify -Dmrm=false -V -B -ntp -e
run: ./mvnw verify -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml

- name: 'Upload daemon test logs'
if: always()
Expand All @@ -57,7 +57,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -67,9 +68,23 @@ jobs:
- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand Down Expand Up @@ -105,7 +120,7 @@ jobs:
objcopy --redefine-syms=client/src/main/resources/glibc/glibc.redef client/target/graalvm-libs-for-glibc-2.12/Scrt1.o 2>/dev/null

- name: 'Build native distribution'
run: ./mvnw verify -Pnative -Dmrm=false -V -B -ntp -e
run: ./mvnw verify -Pnative -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml

- name: 'Verify native binary for only requiring glibc 2.12'
if: ${{ env.OS == 'linux' }}
Expand All @@ -120,11 +135,11 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: daemon-test-logs-${{ env.OS }}
name: daemon-test-logs-${{ env.OS }}-${{ env.ARCH }}
path: integration-tests/target/mvnd-tests/**/daemon*.log

- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: mvnd-${{ env.OS }}
name: mvnd-${{ env.OS }}-${{ env.ARCH }}
path: dist/target/maven-mvnd-*.zip
67 changes: 58 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -44,9 +45,23 @@ jobs:
- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand Down Expand Up @@ -103,17 +118,31 @@ jobs:

source:
name: 'Build source distributions'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v4

- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand All @@ -136,7 +165,7 @@ jobs:
target/maven-mvnd-*.tar.gz

release:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [build, source]

steps:
Expand All @@ -158,8 +187,8 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: ${{ runner.os }}-${{ runner.arch }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-${{ runner.arch }}-m2

- name: ls -R
run: ls -R
Expand Down Expand Up @@ -239,6 +268,26 @@ jobs:
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
asset_content_type: application/x-gzip

- name: Deploy maven-mvnd-darwin-aarch64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
asset_content_type: application/zip

- name: Deploy maven-mvnd-darwin-aarch.tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
asset_content_type: application/x-gzip

- name: Deploy maven-mvnd-windows-amd64.zip
uses: actions/upload-release-asset@v1
env:
Expand Down
2 changes: 1 addition & 1 deletion .mvn/release-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<repositories>
<repository>
<id>maven-staging-1</id>
<url>https://repository.apache.org/content/repositories/maven-1859/</url>
<url>https://repository.apache.org/content/repositories/maven-2146/</url>
<releases>
<enabled>true</enabled>
</releases>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<jakarta.inject.version>1.0</jakarta.inject.version>
<jansi.version>2.4.1</jansi.version>
<jline.version>3.26.1</jline.version>
<maven.version>3.9.8-20240612.175612-19</maven.version>
<maven.version>3.9.8</maven.version>
<!-- Keep in sync with Maven -->
<maven.resolver.version>1.9.20</maven.resolver.version>
<slf4j.version>1.7.36</slf4j.version>
Expand Down