This is an automated email from the ASF dual-hosted git repository. rantunes pushed a commit to branch jit-executor-native-publish-java-artifacts in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git
commit 5979428930b700a01f81ca80fc484e2bed3bb1f8 Author: Rodrigo Antunes <[email protected]> AuthorDate: Mon May 13 10:21:42 2024 -0300 Update jitexecutor-native workflow to publish java artifacts --- .github/workflows/publish-jitexecutor-native.yml | 106 ++++++++++++++--------- 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/.github/workflows/publish-jitexecutor-native.yml b/.github/workflows/publish-jitexecutor-native.yml index bab4aae0a..b39bd0a57 100644 --- a/.github/workflows/publish-jitexecutor-native.yml +++ b/.github/workflows/publish-jitexecutor-native.yml @@ -57,33 +57,15 @@ jobs: maven-version: 3.9.6 - name: "Set up JDK 17" - if: runner.os != 'Windows' uses: actions/setup-java@v4 with: java-version: "17" distribution: "zulu" + server-id: apache.snapshots.https + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD - - name: "Build macOS" - if: runner.os == 'macOS' - run: | - brew install make && \ - wget https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_macos-x64_bin.tar.gz && \ - tar -xzf graalvm-community-jdk-17.0.9_macos-x64_bin.tar.gz && \ - sudo mv graalvm-community-openjdk-17.0.9+9.1 /Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1 - export PATH=/Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1/Contents/Home/bin:$PATH && \ - export GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1/Contents/Home && \ - gu install native-image && \ - mvn -B -fae -ntp -N -e versions:update-parent -DparentVersion="[${{ steps.version.outputs.PROJECT_VERSION }}]" -DallowSnapshots=true -DgenerateBackupPoms=false - mvn -B -fae -ntp -N -e versions:update-child-modules -DallowSnapshots=true -DgenerateBackupPoms=false - mvn clean install -B -ntp -DskipTests -pl jitexecutor-native/jitexecutor-native-darwin -am -Pjitexecutor-native - - - name: "Publish macOS" - if: github.event_name != 'pull_request' && runner.os == 'macOS' - shell: bash - run: | - echo "Publishing macOS..." - - - name: "Build Linux" + - name: "Setup Linux" if: runner.os == 'Linux' run: | sudo apt update && \ @@ -91,24 +73,18 @@ jobs: build-essential \ libgtk-3-dev \ libappindicator3-dev \ - gir1.2-appindicator3-0.1 && \ - mvn -B -fae -ntp -N -e versions:update-parent -DparentVersion="[${{ steps.version.outputs.PROJECT_VERSION }}]" -DallowSnapshots=true -DgenerateBackupPoms=false - mvn -B -fae -ntp -N -e versions:update-child-modules -DallowSnapshots=true -DgenerateBackupPoms=false - mvn clean install -B -ntp -DskipTests -pl jitexecutor-native/jitexecutor-native-linux -am -Pjitexecutor-native + gir1.2-appindicator3-0.1 - - name: "Publish Linux" - if: github.event_name != 'pull_request' && runner.os == 'Linux' - shell: bash + - name: "Setup macOS" + if: runner.os == 'macOS' run: | - echo "Publishing Linux..." - - - name: "Configure Pagefile" - if: runner.os == 'Windows' - uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 #v1.4 - with: - minimum-size: 16GB - maximum-size: 16GB - disk-root: "C:" + brew install make && \ + wget https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-17.0.9/graalvm-community-jdk-17.0.9_macos-x64_bin.tar.gz && \ + tar -xzf graalvm-community-jdk-17.0.9_macos-x64_bin.tar.gz && \ + sudo mv graalvm-community-openjdk-17.0.9+9.1 /Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1 + echo "/Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1/Contents/Home/bin" >> $GITHUB_PATH && \ + echo "GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-community-openjdk-17.0.9+9.1/Contents/Home" >> $GITHUB_ENV && \ + gu install native-image - name: "Setup MSCV" if: runner.os == 'Windows' @@ -125,19 +101,63 @@ jobs: java-version: "17" components: "native-image" - - name: "Build Windows" + - name: "Configure Pagefile" + if: runner.os == 'Windows' + uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 #v1.4 + with: + minimum-size: 16GB + maximum-size: 16GB + disk-root: "C:" + + - name: "Update versions (Linux and macOS)" + if: runner.os == 'Linux' || runner.os == 'macOS' + shell: bash + run: | + mvn -B -fae -ntp -N -e versions:update-parent -DparentVersion="[${{ steps.version.outputs.PROJECT_VERSION }}]" -DallowSnapshots=true -DgenerateBackupPoms=false + mvn -B -fae -ntp -N -e versions:update-child-modules -DallowSnapshots=true -DgenerateBackupPoms=false + + - name: "Update versions Windows" if: runner.os == 'Windows' shell: pwsh run: | mvn -B -fae -ntp -N -e versions:update-parent -DparentVersion="[${{ steps.version.outputs.PROJECT_VERSION }}]" -DallowSnapshots=true -DgenerateBackupPoms=false mvn -B -fae -ntp -N -e versions:update-child-modules -DallowSnapshots=true -DgenerateBackupPoms=false + + - name: "Build macOS" + if: runner.os == 'macOS' && github.event_name == 'pull_request' + shell: bash + run: | + mvn clean install -B -ntp -DskipTests -pl jitexecutor-native/jitexecutor-native-darwin -am -Pjitexecutor-native + + - name: "Build and publish macOS" + if: runner.os == 'macOS' && github.event_name != 'pull_request' + shell: bash + run: | + mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-darwin -am -Pjitexecutor-native + + - name: "Build Linux" + if: runner.os == 'Linux' && github.event_name == 'pull_request' + shell: bash + run: | + mvn clean install -B -ntp -DskipTests -pl jitexecutor-native/jitexecutor-native-linux -am -Pjitexecutor-native + + - name: "Build and Publish Linux" + if: runner.os == 'Linux' && github.event_name != 'pull_request' + shell: bash + run: | + mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-linux -am -Pjitexecutor-native + + - name: "Build Windows" + if: runner.os == 'Windows' && github.event_name == 'pull_request' + shell: pwsh + run: | mvn clean install -B -ntp -DskipTests -pl jitexecutor-native/jitexecutor-native-win32 -am -Pjitexecutor-native - - name: "Publish Windows" - if: github.event_name != 'pull_request' && runner.os == 'Windows' - shell: bash + - name: "Build and Publish Windows" + if: runner.os == 'Windows' && github.event_name != 'pull_request' + shell: pwsh run: | - echo "Publishing Windows..." + mvn clean deploy -B -ntp -DdeployAtEnd -DskipTests -pl jitexecutor-native/jitexecutor-native-win32 -am -Pjitexecutor-native - name: "Upload JIT Executor binary" uses: actions/upload-artifact@v4 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
