Skip to content

Commit

Permalink
#26918 Adding test step to check the built native image.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolina committed Dec 21, 2023
1 parent 5acf46b commit e29bd21
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/cli-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,32 +148,40 @@ jobs:
echo "${DOTCMS_LICENSE_KEY}" > ${DOTCMS_LICENSE_PATH}/license.dat
echo "DOTCMS_LICENSE_FILE=${DOTCMS_LICENSE_PATH}/license.dat" >> "$GITHUB_ENV"
- name: 'Build distribution'
- 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=${{ github.event.inputs.packageType }} -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli
./mvnw package -Dquarkus.package.type=uber-jar -DskipTests=${{ github.event.inputs.skipTests }} -pl :dotcms-cli
- name: 'Test native image'
working-directory: ${{ github.workspace }}
run: |
./mvnw verify -Dnative -pl :dotcms-cli
- name: 'Build Native Image'
if: ${{ success() }}
working-directory: ${{ github.workspace }}
run: |
./mvnw package -Pnative -DskipTests=${{ github.event.inputs.skipTests }} -Dquarkus.native.additional-build-args="-H:ReflectionConfigurationFiles=reflection-config.json,-H:ResourceConfigurationFiles=resources-config.json" -pl :dotcms-cli
./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/
run: |
ls -ltr cli/target/distributions
# - name: 'Distribution tree'
# working-directory: ${{ github.workspace }}/tools/dotcms-cli/
# run: |
# ls -ltr cli/target/distributions

- name: 'Upload build artifact'
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: artifacts
Expand All @@ -183,6 +191,7 @@ jobs:
${{ github.workspace }}/tools/dotcms-cli/cli/target/distributions/*.tar.gz
release:
if: ${{ success() }}
needs: [ precheck, build ]
runs-on: ubuntu-latest
steps:
Expand All @@ -203,9 +212,9 @@ jobs:
name: artifacts
path: ${{ github.workspace }}/artifacts

- name: 'List artifacts'
run: |
ls -R
# - name: 'List artifacts'
# run: |
# ls -R

- name: 'Set up Java'
uses: actions/setup-java@v4
Expand Down
1 change: 1 addition & 0 deletions tools/dotcms-cli/cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.additional-build-args>-H:ResourceConfigurationFiles=resources-config.json,-H:ReflectionConfigurationFiles=reflection-config.json</quarkus.native.additional-build-args>
</properties>
</profile>
</profiles>
Expand Down

0 comments on commit e29bd21

Please sign in to comment.