@@ -17,7 +17,7 @@ name: Deploy project |
17 | 17 |
|
18 | 18 | on: |
19 | 19 | push: |
20 | | - branches: [ "4.2" ] |
| 20 | + branches: [ "5.0" ] |
21 | 21 |
|
22 | 22 | schedule: |
23 | 23 | - cron: '30 1 * * 1' # At 01:30 on Monday, every Monday. |
@@ -37,20 +37,17 @@ concurrency: |
37 | 37 | cancel-in-progress: true |
38 | 38 |
|
39 | 39 | jobs: |
40 | | - stage-snapshot-linux: |
| 40 | + stage-snapshot: |
41 | 41 | runs-on: ubuntu-latest |
42 | 42 | strategy: |
43 | 43 | matrix: |
44 | 44 | include: |
45 | | - - setup: linux-x86_64-java11 |
46 | | - docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-7.111.yaml build" |
47 | | - docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-7.111.yaml run stage-snapshot" |
| 45 | + - setup: linux-x86_64-java25 |
| 46 | + docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.ubi9.yaml build --build-arg java_version=25-zulu" |
| 47 | + docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.ubi9.yaml run stage-snapshot" |
48 | 48 | - setup: linux-aarch64 |
49 | | - docker-compose-build: "-f docker/docker-compose.centos-7.cross.yaml build" |
50 | | - docker-compose-run: "-f docker/docker-compose.centos-7.cross.yaml run cross-compile-aarch64-stage-snapshot" |
51 | | - - setup: linux-riscv64 |
52 | | - docker-compose-build: "-f docker/docker-compose.ubuntu-20.04.cross.yaml build" |
53 | | - docker-compose-run: "-f docker/docker-compose.ubuntu-20.04.cross.yaml run cross-compile-riscv64-stage-snapshot" |
| 49 | + docker-compose-build: "-f docker/docker-compose.centos-7.yaml build" |
| 50 | + docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-snapshot" |
54 | 51 |
|
55 | 52 | name: stage-snapshot-${{ matrix.setup }} |
56 | 53 | steps: |
@@ -84,124 +81,18 @@ jobs: |
84 | 81 | if-no-files-found: error |
85 | 82 | include-hidden-files: true |
86 | 83 |
|
87 | | - stage-snapshot-macos: |
88 | | - strategy: |
89 | | - fail-fast: false |
90 | | - matrix: |
91 | | - include: |
92 | | - - setup: macos-x86_64-java11 |
93 | | - os: macos-15-intel |
94 | | - - setup: macos-aarch64-java11 |
95 | | - os: macos-15 |
96 | | - |
97 | | - runs-on: ${{ matrix.os }} |
98 | | - name: ${{ matrix.setup }} build |
99 | | - |
100 | | - steps: |
101 | | - - uses: actions/checkout@v4 |
102 | | - |
103 | | - - name: Set up JDK 11 |
104 | | - uses: actions/setup-java@v4 |
105 | | - with: |
106 | | - distribution: 'zulu' |
107 | | - java-version: '11' |
108 | | - |
109 | | - # Cache .m2/repository |
110 | | - # Caching of maven dependencies |
111 | | - - uses: actions/cache@v4 |
112 | | - continue-on-error: true |
113 | | - with: |
114 | | - path: ~/.m2/repository |
115 | | - key: cache-maven-${{ hashFiles('**/pom.xml') }} |
116 | | - restore-keys: | |
117 | | - cache-maven-${{ hashFiles('**/pom.xml') }} |
118 | | - cache-maven- |
119 | | -
|
120 | | - - name: Install tools via brew |
121 | | - run: brew bundle |
122 | | - |
123 | | - - name: Create local staging directory |
124 | | - run: mkdir -p ~/local-staging |
125 | | - |
126 | | - - name: Stage snapshots to local staging directory |
127 | | - run: ./mvnw -B -ntp clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DskipRemoteStaging=true -DaltStagingDirectory=$HOME/local-staging -DskipTests=true |
128 | | - |
129 | | - - name: Upload local staging directory |
130 | | - uses: actions/upload-artifact@v4 |
131 | | - with: |
132 | | - name: ${{ matrix.setup }}-local-staging |
133 | | - path: ~/local-staging |
134 | | - if-no-files-found: error |
135 | | - include-hidden-files: true |
136 | | - |
137 | | - stage-snapshot-windows-x86_64: |
138 | | - runs-on: windows-2022 |
139 | | - name: stage-snapshot-windows-x86_64 |
140 | | - env: |
141 | | - # Let's limit the amount of ram that is used to unpack rustup as we saw |
142 | | - # failures sometimes due the fact that not enough memory could be reserved. |
143 | | - RUSTUP_UNPACK_RAM: 134217728 # Use 128 MiB |
144 | | - steps: |
145 | | - - uses: actions/checkout@v4 |
146 | | - |
147 | | - - name: Set up JDK 11 |
148 | | - uses: actions/setup-java@v4 |
149 | | - with: |
150 | | - distribution: 'zulu' |
151 | | - java-version: 11 |
152 | | - |
153 | | - # Cache .m2/repository |
154 | | - - name: Cache local Maven repository |
155 | | - uses: actions/cache@v4 |
156 | | - continue-on-error: true |
157 | | - with: |
158 | | - path: ~/.m2/repository |
159 | | - key: cache-windows-maven-${{ hashFiles('**/pom.xml') }} |
160 | | - restore-keys: | |
161 | | - cache-windows-maven-${{ hashFiles('**/pom.xml') }} |
162 | | - cache-windows-maven- |
163 | | -
|
164 | | - - name: Install stable rust toolchain |
165 | | - uses: dtolnay/rust-toolchain@stable |
166 | | - with: |
167 | | - targets: x86_64-pc-windows-msvc |
168 | | - |
169 | | - - name: Add msbuild to PATH |
170 | | - uses: microsoft/setup-msbuild@v2 |
171 | | - |
172 | | - - name: Configuring Developer Command Prompt |
173 | | - uses: ilammy/msvc-dev-cmd@v1 |
174 | | - with: |
175 | | - arch: x86_amd64 |
176 | | - |
177 | | - - name: Install tools |
178 | | - uses: crazy-max/ghaction-chocolatey@v3 |
179 | | - with: |
180 | | - args: install ninja nasm |
181 | | - |
182 | | - - name: Stage snapshots to local staging directory |
183 | | - run: ./mvnw.cmd -B -ntp --file pom.xml clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DskipRemoteStaging=true -DaltStagingDirectory=/local-staging -DskipTests=true |
184 | | - |
185 | | - - name: Upload local staging directory |
186 | | - uses: actions/upload-artifact@v4 |
187 | | - with: |
188 | | - name: windows-x86_64-local-staging |
189 | | - path: /local-staging |
190 | | - if-no-files-found: error |
191 | | - include-hidden-files: true |
192 | | - |
193 | 84 | deploy-staged-snapshots: |
194 | 85 | runs-on: ubuntu-latest |
195 | 86 | # Wait until we have staged everything |
196 | | - needs: [ stage-snapshot-linux, stage-snapshot-windows-x86_64, stage-snapshot-macos ] |
| 87 | + needs: stage-snapshot |
197 | 88 | steps: |
198 | 89 | - uses: actions/checkout@v4 |
199 | 90 |
|
200 | | - - name: Set up JDK 11 |
| 91 | + - name: Set up JDK 25 |
201 | 92 | uses: actions/setup-java@v4 |
202 | 93 | with: |
203 | 94 | distribution: 'zulu' |
204 | | - java-version: '11' |
| 95 | + java-version: '25' |
205 | 96 |
|
206 | 97 | # Cache .m2/repository |
207 | 98 | - name: Cache local Maven repository |
@@ -214,68 +105,41 @@ jobs: |
214 | 105 | cache-maven-${{ hashFiles('**/pom.xml') }} |
215 | 106 | cache-maven- |
216 | 107 |
|
217 | | - |
218 | | - with: |
219 | | - servers: | |
220 | | - [{ |
221 | | - "id": "central-portal-snapshots", |
222 | | - "username": "${{ secrets.MAVEN_CENTRAL_USERNAME }}", |
223 | | - "password": "${{ secrets.MAVEN_CENTRAL_PASSWORD }}" |
224 | | - }] |
| 108 | + # Setup some env to re-use later. |
| 109 | + - name: Prepare enviroment variables |
| 110 | + run: | |
| 111 | + echo "LOCAL_STAGING_DIR=$HOME/local-staging" >> $GITHUB_ENV |
225 | 112 |
|
226 | 113 | # Hardcode the staging artifacts that need to be downloaded. |
227 | 114 | # These must match the matrix setups. There is currently no way to pull this out of the config. |
228 | | - - name: Download windows_x86_64 staging directory |
229 | | - uses: actions/download-artifact@v4 |
230 | | - with: |
231 | | - name: windows-x86_64-local-staging |
232 | | - path: ~/windows-x86_64-local-staging |
233 | | - |
234 | | - - name: Download macos-aarch64-java11 staging directory |
235 | | - uses: actions/download-artifact@v4 |
236 | | - with: |
237 | | - name: macos-aarch64-java11-local-staging |
238 | | - path: ~/macos-aarch64-java11-local-staging |
239 | | - |
240 | | - - name: Download macos-x86_64-java11 staging directory |
241 | | - uses: actions/download-artifact@v4 |
242 | | - with: |
243 | | - name: macos-x86_64-java11-local-staging |
244 | | - path: ~/macos-x86_64-java11-local-staging |
245 | | - |
246 | 115 | - name: Download linux-aarch64 staging directory |
247 | 116 | uses: actions/download-artifact@v4 |
248 | 117 | with: |
249 | 118 | name: linux-aarch64-local-staging |
250 | 119 | path: ~/linux-aarch64-local-staging |
251 | 120 |
|
252 | | - - name: Download linux-riscv64 staging directory |
| 121 | + - name: Download linux-x86_64-java25 staging directory |
253 | 122 | uses: actions/download-artifact@v4 |
254 | 123 | with: |
255 | | - name: linux-riscv64-local-staging |
256 | | - path: ~/linux-riscv64-local-staging |
| 124 | + name: linux-x86_64-java25-local-staging |
| 125 | + path: ~/linux-x86_64-java25-local-staging |
257 | 126 |
|
258 | | - - name: Download linux-x86_64-java11 staging directory |
259 | | - uses: actions/download-artifact@v4 |
260 | | - with: |
261 | | - name: linux-x86_64-java11-local-staging |
262 | | - path: ~/linux-x86_64-java11-local-staging |
263 | | - |
264 | | - - name: Copy previous build artifacts to local maven repository |
265 | | - run: bash ./.github/scripts/local_staging_install_snapshot.sh ~/.m2/repository ~/windows-x86_64-local-staging ~/macos-aarch64-java11-local-staging ~/macos-x86_64-java11-local-staging ~/linux-aarch64-local-staging ~/linux-riscv64-local-staging ~/linux-x86_64-java11-local-staging |
266 | | - |
267 | | - - name: Generate netty-codec-http3 and deploy to local staging. |
268 | | - run: | |
269 | | - mkdir -p ~/codec-http3-local-staging |
270 | | - ./mvnw -B --file pom.xml -Pnative-dependencies -pl all clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DskipRemoteStaging=true -DaltStagingDirectory=$HOME/codec-http3-local-staging -DskipTests=true |
271 | | -
|
272 | | - - name: Generate netty-all and deploy to local staging. |
| 127 | + - name: Merge staging repositories |
273 | 128 | run: | |
274 | | - mkdir -p ~/all-local-staging |
275 | | - ./mvnw -B --file pom.xml -Pnative-dependencies -pl all clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DskipRemoteStaging=true -DaltStagingDirectory=$HOME/all-local-staging -DskipTests=true |
| 129 | + mkdir -p ~/local-staging/deferred |
| 130 | + cat ~/linux-aarch64-local-staging/deferred/.index >> ~/local-staging/deferred/.index |
| 131 | + cp -r ~/linux-aarch64-local-staging/deferred/* ~/local-staging/deferred/ |
| 132 | + cat ~/linux-x86_64-java25-local-staging/deferred/.index >> ~/local-staging/deferred/.index |
| 133 | + cp -r ~/linux-x86_64-java25-local-staging/deferred/* ~/local-staging/deferred/ |
276 | 134 |
|
277 | | - - name: Merge staging repositories |
278 | | - run: bash ./.github/scripts/local_staging_merge_snapshot.sh ~/local-staging ~/windows-x86_64-local-staging ~/macos-aarch64-java11-local-staging ~/macos-x86_64-java11-local-staging ~/linux-aarch64-local-staging ~/linux-riscv64-local-staging ~/linux-x86_64-java11-local-staging ~/codec-http3-local-staging ~/all-local-staging |
| 135 | + |
| 136 | + with: |
| 137 | + servers: | |
| 138 | + [{ |
| 139 | + "id": "sonatype-nexus-snapshots", |
| 140 | + "username": "${{ secrets.SONATYPE_USERNAME }}", |
| 141 | + "password": "${{ secrets.SONATYPE_PASSWORD }}" |
| 142 | + }] |
279 | 143 |
|
280 | 144 | - name: Deploy local staged artifacts |
281 | | - run: ./mvnw -B -ntp --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=$HOME/local-staging -DserverId=central-portal-snapshots |
| 145 | + run: ./mvnw -B --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=$LOCAL_STAGING_DIR |