Changeset 19030 in josm for trunk/.github/workflows
- Timestamp:
- 2024-04-04T19:24:39+02:00 (8 months ago)
- Location:
- trunk/.github/workflows
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/ant-test.yml
r18993 r19030 20 20 matrix: 21 21 # test against latest update of each major Java version, as well as specific updates of LTS versions: 22 java: [8, 11, 17, 21, 22 -ea]22 java: [8, 11, 17, 21, 22] 23 23 os: [ubuntu-latest, macos-latest, windows-latest] 24 24 name: Java ${{ matrix.java }} on ${{ matrix.os }} … … 44 44 45 45 - name: Install Ant 46 uses: JOSM/JOSMPluginAction/actions/setup-ant@v 146 uses: JOSM/JOSMPluginAction/actions/setup-ant@v2 47 47 48 48 - name: Test with Ant -
trunk/.github/workflows/ant.yml
r18993 r19030 1 1 name: Java CI Build 2 2 env: 3 junit_platform_version: '1.9.3'4 3 JAVAFX_VERSION: '17.0.7' 5 4 on: … … 60 59 draft: false 61 60 prerelease: ${{ env.josm_prerelease }} 61 if: github.ref == 'refs/heads/master' 62 62 63 63 build: … … 70 70 matrix: 71 71 # test against latest update of each major Java version, as well as specific updates of LTS versions: 72 java: [8, 11, 17, 21, 22 -ea]73 os: [ubuntu-latest, macos- latest, windows-latest]72 java: [8, 11, 17, 21, 22] 73 os: [ubuntu-latest, macos-14, windows-latest] 74 74 name: Java ${{ matrix.java }} on ${{ matrix.os }} 75 75 steps: … … 93 93 java-version: ${{ matrix.java }} 94 94 95 - name: Setup x64 Java (Mac) ${{ matrix.java }} 96 if: ${{ runner.os == 'macos' && runner.arch == 'ARM64' && always() }} 97 uses: actions/setup-java@v4 98 with: 99 distribution: 'zulu' 100 java-version: ${{ matrix.java }} 101 architecture: x64 102 95 103 - name: Install Ant 96 uses: JOSM/JOSMPluginAction/actions/setup-ant@v 1104 uses: JOSM/JOSMPluginAction/actions/setup-ant@v2 97 105 98 106 - name: Optimise images … … 114 122 # Calls ant with -Dreleasebuild=true if we're a 'tested' build 115 123 run: | 116 export SIGN_KEYSTORE=certificate.p12 117 echo "$SIGN_CERT" | base64 --decode > $SIGN_KEYSTORE 124 if [ ! -z "${SIGN_CERT}" ]; then 125 export SIGN_KEYSTORE=certificate.p12 126 echo "$SIGN_CERT" | base64 --decode > $SIGN_KEYSTORE 127 fi 118 128 if [ "${{ needs.createrelease.outputs.josm_prerelease }}" == "true" ]; then 119 129 ANT="ant" … … 122 132 fi 123 133 $ANT dist 124 rm $SIGN_KEYSTORE134 if [ ! -z "${SIGN_KEYSTORE}" ]; then rm $SIGN_KEYSTORE; fi 125 135 126 136 - name: Upload jar 127 if: ${{ always() }}137 if: ${{ always() && needs.createrelease.outputs.upload_url }} 128 138 env: 129 139 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} … … 144 154 APPLE_ID_TEAM: ${{ secrets.APPLE_ID_TEAM }} 145 155 run: | 146 if [ ! -f tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}-jmods.zip ]; then 147 curl -o tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}-jmods.zip https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-${JAVAFX_VERSION}_osx-x64_bin-jmods.zip 148 fi 149 unzip tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}-jmods.zip 150 mv javafx-jmods-${JAVAFX_VERSION}/*.jmod $JAVA_HOME/jmods/ 151 ./native/macosx/macos-jpackage.sh ${{ needs.createrelease.outputs.josm_revision }} 156 function setup_openjfx() { 157 if [ ! -f tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}_${2}-jmods.zip ]; then 158 curl -o tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}_${2}-jmods.zip https://download2.gluonhq.com/openjfx/${JAVAFX_VERSION}/openjfx-${JAVAFX_VERSION}_osx-${1}_bin-jmods.zip 159 fi 160 unzip tools/openjfx-${JAVAFX_VERSION}_${{ runner.os }}_${2}-jmods.zip 161 mv javafx-jmods-${JAVAFX_VERSION}/*.jmod $JAVA_HOME/jmods/ 162 } 163 164 if [ ${{ runner.arch }} == "ARM64" ]; then 165 JAVA_HOME="${JAVA_HOME_${{ matrix.java }}_ARM64}" PATH="${JAVA_HOME_${{ matrix.java }}_ARM64}/bin:${PATH}" setup_openjfx aarch64 ARM64 166 JAVA_HOME="${JAVA_HOME_${{ matrix.java }}_X64}" PATH="${JAVA_HOME_${{ matrix.java }}_X64}/bin:${PATH}" setup_openjfx x64 X64 167 JAVA_HOME="${JAVA_HOME_${{ matrix.java }}_ARM64}" ./native/macosx/macos-jpackage.sh ${{ needs.createrelease.outputs.josm_revision }} "${JAVA_HOME_${{ matrix.java }}_X64}" 168 else 169 setup_openjfx x64 X64 170 ./native/macosx/macos-jpackage.sh ${{ needs.createrelease.outputs.josm_revision }} 171 fi 152 172 153 173 - name: Setup Windows PATH … … 173 193 174 194 - name: Upload macOS app 175 if: ${{ runner.os == 'macos' && matrix.java != '8' && matrix.java != '11' && always() }}195 if: ${{ runner.os == 'macos' && matrix.java != '8' && matrix.java != '11' && always() && needs.createrelease.outputs.upload_url }} 176 196 uses: actions/upload-release-asset@v1 177 197 env: … … 183 203 asset_content_type: application/zip 184 204 205 - name: Upload macOS app (x64) 206 if: ${{ runner.os == 'macos' && matrix.java != '8' && matrix.java != '11' && always() && runner.arch == 'ARM64' && needs.createrelease.outputs.upload_url }} 207 uses: actions/upload-release-asset@v1 208 env: 209 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 210 with: 211 upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`. 212 asset_path: app/JOSM_${{ matrix.java }}_x86_64.zip 213 asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}-x64.zip 214 asset_content_type: application/zip 215 216 - name: Upload macOS app (aarch64) 217 if: ${{ runner.os == 'macos' && matrix.java != '8' && matrix.java != '11' && always() && runner.arch == 'ARM64' && needs.createrelease.outputs.upload_url }} 218 uses: actions/upload-release-asset@v1 219 env: 220 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 221 with: 222 upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`. 223 asset_path: app/JOSM_${{ matrix.java }}_arm64.zip 224 asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}-aarch64.zip 225 asset_content_type: application/zip 226 185 227 - name: Upload Windows Installer executable 186 if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() }}228 if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() && needs.createrelease.outputs.upload_url }} 187 229 uses: actions/upload-release-asset@v1 188 230 env: … … 195 237 196 238 - name: Upload Windows Installer package 197 if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() }}239 if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() && needs.createrelease.outputs.upload_url }} 198 240 uses: actions/upload-release-asset@v1 199 241 env:
Note:
See TracChangeset
for help on using the changeset viewer.