Skip to content

Commit

Permalink
Update release actions
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 committed Nov 6, 2024
1 parent 7e93af8 commit 885160a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 43 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Android-Release

on:
schedule:
# scheduled to run UTC 22:00 (07:00 in South Korea), Every 1st of the month
- cron: '0 22 1 * *'
workflow_dispatch:
push:
tags:
- "v*.*.*"

jobs:
build-android-on-ubuntu:
Expand Down Expand Up @@ -37,14 +36,17 @@ jobs:
./build/android/escargot/build/**/escargot-*.jar
!./build/android/escargot/build/**/escargot-*Shell.aar
if-no-files-found: error
overwrite: true

build-android-on-macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
brew update
brew install ninja pkg-config icu4c
- name: Set up JDK
uses: actions/[email protected]
with:
Expand All @@ -65,9 +67,8 @@ jobs:
path: |
./build/android/escargot/build/libs/escargot-mac.jar
if-no-files-found: error
overwrite: true

merge-upload-release:
merge-update-release:
needs: [build-android-on-ubuntu, build-android-on-macos]
runs-on: ubuntu-latest
steps:
Expand All @@ -88,12 +89,9 @@ jobs:
find . -type f -name "escargot-*.aar" -exec mv {} . \;
find . -type f -name "escargot-*.jar" -exec mv {} . \;
ls -R ./
- name: Upload final artifacts
uses: actions/upload-artifact@v4
find ./ -type f -name "escargot-*.aar" -o -name "escargot-*.jar" | zip Android-Release-${{ env.RELEASE_DATE }}.zip -@
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
name: Android-Release-${{ env.RELEASE_DATE }}
path: |
./artifacts/escargot-*.aar
./artifacts/escargot-*.jar
if-no-files-found: error
overwrite: true
files: |
artifacts/Android-Release-${{ env.RELEASE_DATE }}.zip
33 changes: 7 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64-result
name: build-artifact-mac64
path: out/escargot-mac64

build-mac64arm:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64arm-result
name: build-artifact-mac64arm
path: out/escargot-mac64arm

build-windows:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: win-${{ matrix.arch }}-result
name: build-artifact-win-${{ matrix.arch }}
path: out\escargot-win-${{ matrix.arch }}.exe

build-linux:
Expand Down Expand Up @@ -155,38 +155,19 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux-result
name: build-artifact-linux
path: out/escargot-linux-*

update-release:
needs: [build-mac64, build-mac64arm, build-windows, build-linux]
runs-on: ubuntu-latest
steps:
- name: Download mac64 result
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: mac64-result
path: artifacts
- name: Download mac64arm result
uses: actions/download-artifact@v4
with:
name: mac64arm-result
path: artifacts
- name: Download win32 result
uses: actions/download-artifact@v4
with:
name: win-x86-result
path: artifacts
- name: Download win64 result
uses: actions/download-artifact@v4
with:
name: win-x64-result
path: artifacts
- name: Download linux result
uses: actions/download-artifact@v4
with:
name: linux-result
path: artifacts
pattern: build-artifact-*
merge-multiple: true
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
Expand Down
13 changes: 11 additions & 2 deletions build/android/escargot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,17 @@ task buildCMakeNativeNoNDK(type: Exec) {
}
os.toString().trim()
}
environment("PKG_CONFIG_PATH", "/usr/local/opt/icu4c/lib/pkgconfig")
commandLine "/usr/bin/env", "cmake", "-DESCARGOT_HOST=darwin", "-DESCARGOT_ARCH=x64", "-DESCARGOT_OUTPUT=static_lib", "-DUNDER_NDK=OFF", "-DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF",
var icu4cPath = new ByteArrayOutputStream().withStream { os ->
exec {
commandLine "sh", "-c", "brew --prefix icu4c"
standardOutput = os
}
os.toString().trim()
}
var pkgConfigPath = icu4cPath + "/lib/pkgconfig"
environment("PKG_CONFIG_PATH", pkgConfigPath)
commandLine "/usr/bin/env", "cmake", "-DESCARGOT_HOST=darwin", "-DESCARGOT_ARCH=x64", "-DESCARGOT_OUTPUT=static_lib", "-DUNDER_NDK=OFF",
"-DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF",
"-DJAVA_HOME=" + javaHome, "-DJAVA_INCLUDE_PATH=" + javaHome + "/include",
"-DJAVA_INCLUDE_PATH2=" + javaHome + "/include/darwin", "-DJAVA_AWT_INCLUDE_PATH=" + javaHome + "/include",
srcForNativeNoNDK.absolutePath
Expand Down

0 comments on commit 885160a

Please sign in to comment.