Skip to content

Commit

Permalink
Update release action
Browse files Browse the repository at this point in the history
Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 committed Oct 29, 2024
1 parent 98a7eaf commit f7c58b7
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analysis-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
- name: Build
env:
BUILD_OPTIONS: -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_CODE_CACHE=ON -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_CODE_CACHE=ON -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
export PATH=$GITHUB_WORKSPACE/cov-analysis-linux64/bin:$PATH
cmake -H. -Bout/coverity_scan $BUILD_OPTIONS
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
sudo apt-get install -y pypy ninja-build libicu-dev gcovr
- name: Build x64
env:
BUILD_OPTIONS: -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_COVERAGE=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_COVERAGE=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/coverage $BUILD_OPTIONS
ninja -Cout/coverage
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/es-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

env:
RUNNER: tools/run-tests.py
Expand Down Expand Up @@ -33,7 +34,7 @@ jobs:
- name: Install Packages
run: |
brew update
brew install cmake ninja pkg-config icu4c
brew install ninja icu4c
- name: Build x64
env:
BUILD_OPTIONS: -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
Expand All @@ -59,7 +60,7 @@ jobs:
- name: Install Packages
run: |
brew update
brew install cmake ninja pkg-config icu4c
brew install ninja icu4c
- name: Build arm64
env:
BUILD_OPTIONS: -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
Expand Down Expand Up @@ -89,7 +90,6 @@ jobs:
- name: Install Packages
run: |
brew update
brew install cmake pkg-config
- name: Set up JDK
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
dpkg -X libicu-dev_70.1-2ubuntu1_amd64.deb $GITHUB_WORKSPACE/icu64
- name: Build x86/x64
env:
BUILD_OPTIONS_X86: -DESCARGOT_MODE=debug -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_OUTPUT=shell -GNinja
BUILD_OPTIONS_X86: -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_MODE=debug -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_OUTPUT=shell -GNinja
BUILD_OPTIONS_X64: -DESCARGOT_MODE=debug -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
export CXXFLAGS="-I$GITHUB_WORKSPACE/icu32/usr/include"
Expand Down
282 changes: 282 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
name: Release

on:
push:
tags:
- "v*.*.*"

env:
RUNNER: tools/run-tests.py
BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja

jobs:
build-mac64:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
brew update
brew install ninja icu4c
- name: Build x64
run: |
# check cpu
sysctl -a | grep machdep.cpu
# add icu path to pkg_config_path
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
cmake -H. -Bout/ $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-mac64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64-result
path: out/escargot-mac64

build-mac64arm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
brew update
brew install ninja icu4c
- name: Build arm64
run: |
# check cpu
sysctl -a | grep machdep.cpu
# add icu path to pkg_config_path
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"
cmake -H. -Bout/ $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-mac64arm
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64arm-result
path: out/escargot-mac64arm

build-win32:
runs-on: windows-2022
steps:
- name: Set git cllf config
run: |
git config --global core.autocrlf input
git config --global core.eol lf
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 20348
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install msvc redist package
run: |
(new-object System.Net.WebClient).DownloadFile('https://github.com/abbodi1406/vcredist/releases/download/v0.73.0/VisualCppRedist_AIO_x86_x64.exe','VisualCppRedist_AIO_x86_x64.exe')
.\VisualCppRedist_AIO_x86_x64.exe /y
- uses: ilammy/[email protected]
with:
arch: x86
sdk: "10.0.20348.0"
- name: Build x86
run: |
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_ARCH=x86 -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
CMake --build out/ --config Release
- name: Check
run: |
python tools\run-tests.py --engine=%cd%\out\escargot.exe new-es
rename out\escargot.exe escargot-win32.exe
shell: cmd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: win32-result
path: out\escargot-win32.exe

build-win64:
runs-on: windows-2022
steps:
- name: Set git cllf config
run: |
git config --global core.autocrlf input
git config --global core.eol lf
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 20348
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install msvc redist package
run: |
(new-object System.Net.WebClient).DownloadFile('https://github.com/abbodi1406/vcredist/releases/download/v0.73.0/VisualCppRedist_AIO_x86_x64.exe','VisualCppRedist_AIO_x86_x64.exe')
.\VisualCppRedist_AIO_x86_x64.exe /y
- uses: ilammy/[email protected]
with:
arch: x64
sdk: "10.0.20348.0"
- name: Build x64
run: |
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x64 -DESCARGOT_ARCH=x64 -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
CMake --build out/ --config Release
- name: Check
run: |
python tools\run-tests.py --engine=%cd%\out\escargot.exe new-es
rename out\escargot.exe escargot-win64.exe
shell: cmd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: win64-result
path: out\escargot-win64.exe

build-linux32:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libicu-dev
- name: Build x86
run: |
cmake -H. -Bout/ -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_TEMPORAL=ON $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
# set locale
sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
locale
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-linux32
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux32-result
path: out/escargot-linux32

build-linux64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libicu-dev
- name: Build x64
run: |
cmake -H. -Bout/ -DESCARGOT_TEMPORAL=ON $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
# set locale
sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
locale
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-linux64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux64-result
path: out/escargot-linux64

build-linux64-wasm:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libicu-dev gcc-multilib g++-multilib
- name: Build x64
run: |
cmake -H. -Bout/ -DESCARGOT_WASM=ON $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es wasm-js
mv out/escargot out/escargot-linux64-wasm
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux64-wasm-result
path: out/escargot-linux64-wasm

release:
needs: [build-mac64, build-mac64arm, build-win32, build-win64, build-linux32, build-linux64, build-linux64-wasm]
runs-on: ubuntu-latest
steps:
- name: Download mac64 result
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: win32-result
path: artifacts
- name: Download win64 result
uses: actions/download-artifact@v4
with:
name: win64-result
path: artifacts
- name: Download linux32 result
uses: actions/download-artifact@v4
with:
name: linux32-result
path: artifacts
- name: Download linux64 result
uses: actions/download-artifact@v4
with:
name: linux64-result
path: artifacts
- name: Download linux64-wasm result
uses: actions/download-artifact@v4
with:
name: linux64-wasm-result
path: artifacts
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/escargot-*

0 comments on commit f7c58b7

Please sign in to comment.