1515 LC_ALL : C.UTF-8
1616 LANG : C.UTF-8
1717 VCPKG_BINARY_SOURCES : clear;files,${{ github.workspace }}/.vcpkg-cache,readwrite
18- # ASSEMBLE_ONLY: "true"
1918
2019jobs :
21- macos :
22- name : Build on macOS
23- runs-on : macos -latest
20+ windows :
21+ name : Build on Windows
22+ runs-on : windows -latest
2423 steps :
2524 - name : Checkout
2625 uses : actions/checkout@v4
@@ -58,30 +57,34 @@ jobs:
5857 cache : gradle
5958 check-latest : true
6059 - name : Build
61- run : ./gradlew --no-daemon assembleAll
62- - name : Publish package
63- run : ./gradlew --no-daemon publishToMavenCentral
64- env :
65- ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.PUBLICATION_USERNAME }}
66- ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.PUBLICATION_PASSWORD }}
67- ORG_GRADLE_PROJECT_signingInMemoryKeyId : ${{ secrets.SIGNING_KEY_ID }}
68- ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.SIGNING_KEY_RING }}
69- ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.SIGNING_PASSWORD }}
60+ run : ./gradlew --no-daemon assembleProjects
61+ - name : Upload artifacts
62+ uses : actions/upload-artifact@v4
63+ with :
64+ name : " artifacts-windows"
65+ path : " generated-kotlin-wrappers"
66+ if-no-files-found : " ignore"
7067 - name : Bundle the build report
7168 if : failure()
7269 run : find . -type d -name 'reports' | zip -@ -r build-report.zip
7370 - name : Upload the build report
7471 if : failure()
7572 uses : actions/upload-artifact@master
7673 with :
77- name : build-report
74+ name : build-report-windows
7875 path : |
7976 build-report.zip
80- vcpkg/buildtrees/** /*.log
77+ vcpkg/buildtrees/*/*.log
8178
82- windows :
83- name : Build on Windows
84- runs-on : windows-latest
79+ linux :
80+ name : Build on Linux
81+ runs-on : ubuntu-latest
82+ strategy :
83+ matrix :
84+ split : [0, 1]
85+ env :
86+ BUILD_SPLIT_ID : ${{ matrix.split }}
87+ MAX_SPLITS : " 2"
8588 steps :
8689 - name : Checkout
8790 uses : actions/checkout@v4
@@ -99,7 +102,14 @@ jobs:
99102 .vcpkg-cache
100103 vcpkg/buildtrees
101104 vcpkg/downloads
102- key : ${{ runner.os }}-${{ runner.arch }}
105+ key : ${{ runner.os }}-${{ runner.arch }}-${{ matrix.split }}
106+ - name : Install build tools
107+ env :
108+ DEBIAN_FRONTEND : noninteractive
109+ TZ : Etc/UTC
110+ run : |
111+ sudo apt-get update
112+ sudo apt-get install -y git build-essential crossbuild-essential-arm64 pkg-config curl zip unzip tar
103113 - name : Setup vcpkg
104114 run : |
105115 cd vcpkg
@@ -109,6 +119,14 @@ jobs:
109119 git fetch base master
110120 git rebase base/master
111121 ./bootstrap-vcpkg.sh -disableMetrics
122+ - name : Install emsdk
123+ if : false # Currently we don't build for WASM
124+ run : |
125+ git clone https://github.com/emscripten-core/emsdk.git
126+ cd emsdk
127+ ./emsdk install latest
128+ ./emsdk activate latest
129+ source ./emsdk_env.sh
112130 - name : Validate Gradle Wrapper
113131 uses : gradle/actions/wrapper-validation@v4
114132 - name : Install JDK
@@ -119,30 +137,36 @@ jobs:
119137 cache : gradle
120138 check-latest : true
121139 - name : Build
122- run : ./gradlew --no-daemon assembleAll
123- - name : Publish package
124- run : ./gradlew --no-daemon publishToMavenCentral
125- env :
126- ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.PUBLICATION_USERNAME }}
127- ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.PUBLICATION_PASSWORD }}
128- ORG_GRADLE_PROJECT_signingInMemoryKeyId : ${{ secrets.SIGNING_KEY_ID }}
129- ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.SIGNING_KEY_RING }}
130- ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.SIGNING_PASSWORD }}
140+ run : |
141+ # source ./emsdk/emsdk_env.sh
142+ ./gradlew --no-daemon assembleProjects
143+ - name : Upload artifacts
144+ uses : actions/upload-artifact@v4
145+ with :
146+ name : artifacts-linux- ${{ matrix.split }}
147+ path : generated-kotlin-wrappers
148+ if-no-files-found : " ignore "
131149 - name : Bundle the build report
132150 if : failure()
133151 run : find . -type d -name 'reports' | zip -@ -r build-report.zip
134152 - name : Upload the build report
135153 if : failure()
136154 uses : actions/upload-artifact@master
137155 with :
138- name : build-report
156+ name : build-report-linux-${{ matrix.split }}
139157 path : |
140158 build-report.zip
141159 vcpkg/buildtrees/*/*.log
142160
143- linux :
144- name : Build on Linux
145- runs-on : ubuntu-latest
161+ macos :
162+ name : Build on macOS
163+ runs-on : macos-latest
164+ strategy :
165+ matrix :
166+ split : [0, 1, 2]
167+ env :
168+ BUILD_SPLIT_ID : ${{ matrix.split }}
169+ MAX_SPLITS : " 3"
146170 steps :
147171 - name : Checkout
148172 uses : actions/checkout@v4
@@ -160,14 +184,7 @@ jobs:
160184 .vcpkg-cache
161185 vcpkg/buildtrees
162186 vcpkg/downloads
163- key : ${{ runner.os }}-${{ runner.arch }}
164- - name : Install build tools
165- env :
166- DEBIAN_FRONTEND : noninteractive
167- TZ : Etc/UTC
168- run : |
169- sudo apt-get update
170- sudo apt-get install -y git build-essential crossbuild-essential-arm64 pkg-config curl zip unzip tar
187+ key : ${{ runner.os }}-${{ runner.arch }}-${{ matrix.split }}
171188 - name : Setup vcpkg
172189 run : |
173190 cd vcpkg
@@ -177,13 +194,6 @@ jobs:
177194 git fetch base master
178195 git rebase base/master
179196 ./bootstrap-vcpkg.sh -disableMetrics
180- - name : Install emsdk
181- run : |
182- git clone https://github.com/emscripten-core/emsdk.git
183- cd emsdk
184- ./emsdk install latest
185- ./emsdk activate latest
186- source ./emsdk_env.sh
187197 - name : Validate Gradle Wrapper
188198 uses : gradle/actions/wrapper-validation@v4
189199 - name : Install JDK
@@ -194,12 +204,77 @@ jobs:
194204 cache : gradle
195205 check-latest : true
196206 - name : Build
207+ run : ./gradlew --no-daemon assembleProjects
208+ - name : Upload artifacts
209+ uses : actions/upload-artifact@v4
210+ with :
211+ name : artifacts-macos-${{ matrix.split }}
212+ path : generated-kotlin-wrappers
213+ if-no-files-found : " ignore"
214+ - name : Bundle the build report
215+ if : failure()
216+ run : find . -type d -name 'reports' | zip -@ -r build-report.zip
217+ - name : Upload the build report
218+ if : failure()
219+ uses : actions/upload-artifact@master
220+ with :
221+ name : build-report-macos-${{ matrix.split }}
222+ path : |
223+ build-report.zip
224+ vcpkg/buildtrees/**/*.log
225+
226+ publish :
227+ name : Publish artifacts
228+ runs-on : macos-latest
229+ needs :
230+ - linux
231+ - macos
232+ - windows
233+ env :
234+ PUBLISHING : " true"
235+ steps :
236+ - name : Checkout
237+ uses : actions/checkout@v4
238+ - name : Checkout
239+ uses : actions/checkout@v4
240+ with :
241+ repository : ensody/vcpkg
242+ path : vcpkg
243+ fetch-depth : 0
244+ - name : Setup vcpkg
197245 run : |
198- source ./emsdk/emsdk_env.sh
199- ./gradlew --no-daemon assembleAll
200- - name : Publish package
246+ cd vcpkg
247+ git config user.name "$(git log -1 --pretty=format:'%an')"
248+ git config user.email "$(git log -1 --pretty=format:'%ae')"
249+ git remote add base https://github.com/microsoft/vcpkg
250+ git fetch base master
251+ git rebase base/master
252+ ./bootstrap-vcpkg.sh -disableMetrics
253+ - name : Validate Gradle Wrapper
254+ uses : gradle/actions/wrapper-validation@v4
255+ - name : Install JDK
256+ uses : actions/setup-java@v4
257+ with :
258+ java-version : " 17"
259+ distribution : " temurin"
260+ cache : gradle
261+ check-latest : true
262+ - name : Download all build artifacts
263+ uses : actions/download-artifact@v4
264+ with :
265+ pattern : " artifacts-*"
266+ path : " generated-kotlin-wrappers"
267+ merge-multiple : true
268+ - name : Generate wrappers
269+ run : ./gradlew --no-daemon generateBuildScripts
270+ - name : Build wrappers
271+ run : ./gradlew --no-daemon assemble
272+ env :
273+ WITH_WRAPPERS : " true"
274+ - name : Publish
201275 run : ./gradlew --no-daemon publishToMavenCentral
202276 env :
277+ WITH_WRAPPERS : " true"
203278 ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.PUBLICATION_USERNAME }}
204279 ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.PUBLICATION_PASSWORD }}
205280 ORG_GRADLE_PROJECT_signingInMemoryKeyId : ${{ secrets.SIGNING_KEY_ID }}
@@ -212,53 +287,7 @@ jobs:
212287 if : failure()
213288 uses : actions/upload-artifact@master
214289 with :
215- name : build-report
290+ name : build-report-publish
216291 path : |
217292 build-report.zip
218- vcpkg/buildtrees/*/*.log
219-
220- # aggregate:
221- # runs-on: ubuntu-latest
222- # needs:
223- # - macos
224- # - linux
225- # - windows
226- # env:
227- # ASSEMBLE_ONLY: "false"
228- # steps:
229- # - name: Checkout
230- # uses: actions/checkout@v4
231- # - name: Validate Gradle Wrapper
232- # uses: gradle/actions/wrapper-validation@v4
233- # - name: Install JDK
234- # uses: actions/setup-java@v4
235- # with:
236- # java-version: "17"
237- # distribution: "temurin"
238- # cache: gradle
239- # check-latest: true
240- # - name: Download all build artifacts
241- # uses: actions/download-artifact@v4
242- # with:
243- # pattern: "artifacts-*"
244- # path: "build/nativebuilds"
245- # merge-multiple: true
246- # - name: Publish package
247- # run: ./gradlew --no-daemon publishToMavenCentral
248- # env:
249- # ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.PUBLICATION_USERNAME }}
250- # ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.PUBLICATION_PASSWORD }}
251- # ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
252- # ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY_RING }}
253- # ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
254- # - name: Bundle the build report
255- # if: failure()
256- # run: find . -type d -name 'reports' | zip -@ -r build-report.zip
257- # - name: Upload the build report
258- # if: failure()
259- # uses: actions/upload-artifact@master
260- # with:
261- # name: build-report
262- # path: |
263- # build-report.zip
264- # vcpkg/buildtrees/*/*.log
293+ vcpkg/buildtrees/**/*.log
0 commit comments