Skip to content

Commit

Permalink
Update Jenkinsfiles
Browse files Browse the repository at this point in the history
* add arm64 version of jenkins
* fix arm64-gcc issue

Signed-off-by: Seonghyun Kim <[email protected]>
  • Loading branch information
ksh8281 authored and clover2123 committed Jul 18, 2023
1 parent 2cc4dc0 commit 0c834fe
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 142 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/es-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,60 +121,6 @@ jobs:
ninja -Cout/clang/x64
./tools/run-tests.py --engine="./out/clang/x64/escargot" new-es
build-on-armv7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build in arm32 container
uses: uraimo/[email protected]
with:
arch: armv7
distro: ubuntu_latest

# Install deps into the container. With the token, the container will be cached
# The image is cached publically like a package
githubToken: ${{ github.token }}

install: |
apt-get update
apt-get install -y cmake build-essential ninja-build pkg-config python3 libicu-dev clang-12
#FIXME fix clang version as to 12
ln -s /usr/bin/clang-12 /usr/bin/clang
ln -s /usr/bin/clang++-12 /usr/bin/clang++
run: |
CC=clang CXX=clang++ cmake -H. -Bout/release -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
ninja -Cout/release
python3 ./tools/run-tests.py --engine="./out/release/escargot" new-es
build-on-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build in arm64 container
uses: uraimo/[email protected]
with:
arch: aarch64
distro: ubuntu_latest

# Install deps into the container. With the token, the container will be cached
# The image is cached publically like a package
githubToken: ${{ github.token }}

install: |
apt-get update
apt-get install -y cmake build-essential ninja-build pkg-config python3 libicu-dev clang-12
#FIXME fix clang version as to 12
ln -s /usr/bin/clang-12 /usr/bin/clang
ln -s /usr/bin/clang++-12 /usr/bin/clang++
run: |
CC=clang CXX=clang++ cmake -H. -Bout/release -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
ninja -Cout/release
python3 ./tools/run-tests.py --engine="./out/release/escargot" new-es
test-on-windows-clang-cl:
runs-on: windows-2022
strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ cmake_install.cmake
.vscode
EscargotInfo.h
third_party/wasm/config.h
escargot.pc
88 changes: 88 additions & 0 deletions .jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
def isPr() {
env.CHANGE_ID != null
}
node {
currentBuild.displayName = "Escargot test on x86"
try {
stage("Get source") {
def url = 'https://github.com/Samsung/escargot.git'

if (isPr()) {
def refspec = "+refs/pull/${env.CHANGE_ID}/head:refs/remotes/origin/PR-${env.CHANGE_ID} +refs/heads/master:refs/remotes/origin/master"
def extensions = [[$class: 'PreBuildMerge', options: [mergeRemote: "refs/remotes/origin", mergeTarget: "PR-${env.CHANGE_ID}"]]]
checkout([
$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: extensions,
submoduleCfg: [],
userRemoteConfigs: [[
refspec: refspec,
url: url
]]
])
} else {
def refspec = "+refs/heads/master:refs/remotes/origin/master"
def extensions = []
checkout([
$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'WipeWorkspace']],
submoduleCfg: [],
userRemoteConfigs: [[
refspec: refspec,
url: url
]]
])
}
}

stage('Submodule update') {
sh 'git submodule update --init test third_party/GCutil'
}

stage('Prepare build(gcc)') {
sh 'LDFLAGS=" -L/usr/icu32/lib/ -Wl,-rpath=/usr/icu32/lib/" PKG_CONFIG_PATH="/usr/icu32/lib/pkgconfig/" cmake -H./ -Bbuild/out_linux -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x86 -DESCARGOT_MODE=debug -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja'
sh 'LDFLAGS=" -L/usr/icu32/lib/ -Wl,-rpath=/usr/icu32/lib/" PKG_CONFIG_PATH="/usr/icu32/lib/pkgconfig/" cmake -H./ -Bbuild/out_linux_release -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x86 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja'
sh 'gcc -shared -m32 -fPIC -o backtrace-hooking-32.so tools/test/test262/backtrace-hooking.c'
sh 'LDFLAGS=" -L/usr/icu64/lib/ -Wl,-rpath=/usr/icu64/lib/" PKG_CONFIG_PATH="/usr/icu64/lib/pkgconfig/" cmake -H./ -Bbuild/out_linux64 -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=debug -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja'
sh 'LDFLAGS=" -L/usr/icu64/lib/ -Wl,-rpath=/usr/icu64/lib/" PKG_CONFIG_PATH="/usr/icu64/lib/pkgconfig/" cmake -H./ -Bbuild/out_linux64_release -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja'
}

stage('Build(gcc)') {
parallel (
'release-build' : {
sh 'cd build/out_linux/; ninja '
sh 'cd build/out_linux64/; ninja'
},
'debug-build' : {
sh 'cd build/out_linux_release/; ninja'
sh 'cd build/out_linux64_release/; ninja'
},
)
}

stage('Running test') {
timeout(30) {
parallel (
'release-32bit-test262' : {
sh 'GC_FREE_SPACE_DIVISOR=1 tools/run-tests.py --arch=x86 --engine="${WORKSPACE}/build/out_linux_release/escargot" test262'
},
'debug-32bit-test262' : {
sh 'GC_FREE_SPACE_DIVISOR=1 ESCARGOT_LD_PRELOAD=${WORKSPACE}/backtrace-hooking-32.so tools/run-tests.py --arch=x86 --engine="${WORKSPACE}/build/out_linux/escargot" test262'
},
'release-64bit-test262' : {
sh 'GC_FREE_SPACE_DIVISOR=1 tools/run-tests.py --arch=x86_64 --engine="${WORKSPACE}/build/out_linux64_release/escargot" test262'
},
'kangax test-suites' : {
sh 'python tools/kangax/run-kangax.py --engine="${WORKSPACE}/build/out_linux64/escargot"'
},
)
}
}

} catch (e) {
throw e
} finally {
cleanWs()
}
}
60 changes: 60 additions & 0 deletions .jenkins/JenkinsfileArm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
def isPr() {
env.CHANGE_ID != null
}
node {
currentBuild.displayName = "Escargot test on Arm"
try {
stage("Get source") {
def url = 'https://github.com/Samsung/escargot.git'
if (isPr()) {
def refspec = "+refs/pull/${env.CHANGE_ID}/head:refs/remotes/origin/PR-${env.CHANGE_ID} +refs/heads/master:refs/remotes/origin/master"
def extensions = [[$class: 'PreBuildMerge', options: [mergeRemote: "refs/remotes/origin", mergeTarget: "PR-${env.CHANGE_ID}"]]]
checkout([
$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: extensions,
submoduleCfg: [],
userRemoteConfigs: [[
refspec: refspec,
url: url
]]
])
} else {
def refspec = "+refs/heads/master:refs/remotes/origin/master"
def extensions = []
checkout([
$class: 'GitSCM',
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'WipeWorkspace']],
submoduleCfg: [],
userRemoteConfigs: [[
refspec: refspec,
url: url
]]
])
}
}

stage('Submodule update') {
sh 'git submodule update --init test third_party/GCutil'
}

stage('Prepare build') {
sh 'cmake -H./ -Bout -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja'
}

stage('Build') {
sh 'cmake --build ./out/'
}

stage('Running test') {
timeout(30) {
sh '#!/bin/bash\nGC_FREE_SPACE_DIVISOR=1 tools/run-tests.py --engine="${WORKSPACE}/out/escargot" --extra-arg="--skip intl402" new-es v8 spidermonkey chakracore test262'
}
}
} catch (e) {
throw e
} finally {
cleanWs()
}
}
87 changes: 0 additions & 87 deletions Jenkinsfile

This file was deleted.

8 changes: 7 additions & 1 deletion src/runtime/GlobalObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,14 @@ static bool isInfinity(String* str, unsigned p, unsigned length)
&& str->charAt(p + 7) == 'y';
}

// there is optimizer bug on arm64-gcc :(
#if defined(CPU_ARM64) && defined(COMPILER_GCC)
#define ATTRIBUTE_NO_OPTIMIZE_IF_ARM64_GCC ATTRIBUTE_NO_OPTIMIZE
#else
#define ATTRIBUTE_NO_OPTIMIZE_IF_ARM64_GCC
#endif

static Value builtinParseInt(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
ATTRIBUTE_NO_OPTIMIZE_IF_ARM64_GCC static Value builtinParseInt(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional<Object*> newTarget)
{
Value ret;

Expand Down

0 comments on commit 0c834fe

Please sign in to comment.