Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github actions. #1962

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = {
{
// Optional rules
'max-len': [2, {
code: 80,
code: 120,
tabWidth: 2,
ignoreUrls: true,
ignoreTemplateLiterals: true,
Expand Down
137 changes: 137 additions & 0 deletions .github/workflows/gh-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: IoT.js CI

on: [push, pull_request]

env:
RUNNER: tools/ci_script.py

jobs:
"Linux-x86-64_Build_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="host-linux" $RUNNER

"Mock_Linux_Build_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="mock-linux" $RUNNER

"Linux-x86-64_Build_with_N-API_support_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="n-api" $RUNNER

"Linux-x86-64_Build_with_N-API_ES_2015_support_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="n-api-es2015-subset" $RUNNER

"Raspberry_Pi_2_Build_Test":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="rpi2" $RUNNER

"STM32f4_Discovery_with_Nuttx_Build_Test":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="stm32f4dis" $RUNNER

"Tizen_Build_Test":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="tizen" $RUNNER

"ECMAScript_2015_features_Build_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="es2015" $RUNNER

"External_modules_Build_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="external-modules" $RUNNER

"Linux-x86-64_without_snapshot_Build_and_Correctness_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="no-snapshot" $RUNNER

"Misc_checks_style_checker":
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: sudo apt update
- run: sudo apt install -y npm clang-format-3.9
- run: npm install eslint
- run: OPTS="misc" $RUNNER

"OSX-x86-64_Build_and_Correctness_Tests":
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="host-darwin" $RUNNER

"ASAN_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="asan" $RUNNER

"UBSAN_Tests":
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: OPTS="ubsan" $RUNNER

"Windows-x86_64":
runs-on: windows-latest
strategy:
matrix:
include:
- configuration: Debug
- configuration: Release
steps:
- run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- run: npm install
- run: python tools\build.py "--cmake-param=-GVisual Studio 16 2019"
--experimental
--buildtype=${{ matrix.configuration }}
--target-arch=x86_64
--run-test=full
--jerry-profile=es.next
--profile=test/profiles/host-windows.profile

"Windows-i686":
runs-on: windows-latest
strategy:
matrix:
include:
- configuration: Debug
- configuration: Release
steps:
- run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- run: npm install
- run: python tools\build.py "--cmake-param=-GVisual Studio 16 2019"
--experimental
--buildtype=${{ matrix.configuration }}
--target-arch=i686
--run-test=full
--jerry-cmake-param=-DJERRY_SYSTEM_ALLOCATOR=ON
--jerry-profile=es5.1
--profile=test/profiles/host-windows.profile
100 changes: 0 additions & 100 deletions .travis.yml

This file was deleted.

36 changes: 27 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.5)
include(CheckCCompilerFlag)

project(IOTJS C)
Expand All @@ -26,6 +26,13 @@ if(NOT DEFINED TARGET_OS)
"TARGET_OS not specified, using '${TARGET_OS}' from CMAKE_SYSTEM_NAME")
endif()

if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CONFIG_TYPE $<$<CONFIG:Debug>:Debug>)
set(CONFIG_TYPE ${CONFIG_TYPE}$<$<CONFIG:Release>:Release>)
set(CONFIG_TYPE ${CONFIG_TYPE}$<$<CONFIG:RelWithDebInfo>:RelWithDebInfo>)
set(CONFIG_TYPE ${CONFIG_TYPE}$<$<CONFIG:MinSizeRel>:MinSizeRel>)
endif()

if(NOT CMAKE_BUILD_TYPE)
message("CMAKE_BUILD_TYPE was not set! Configuring for Debug build!")
set(CMAKE_BUILD_TYPE Debug)
Expand All @@ -48,6 +55,16 @@ if(NOT DEFINED ENABLE_LTO)
set(ENABLE_LTO OFF)
endif()

if(NOT DEFINED JERRY_LINE_INFO)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
message("Line info default enabled in debug mode")
set(JERRY_LINE_INFO ON)
else()
message("Line info default disabled in non debug mode")
set(JERRY_LINE_INFO OFF)
endif()
endif()

macro(iotjs_add_flags VAR)
foreach(_flag ${ARGN})
set(${VAR} "${${VAR}} ${_flag}")
Expand All @@ -69,7 +86,6 @@ endmacro()

if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
set(USING_MSVC 1)
set(CONFIG_TYPE $<$<CONFIG:Debug>:Debug>$<$<CONFIG:Release>:Release>)
# disable warning C4820: 'x' bytes padding added after construct 'membername'
iotjs_add_compile_flags(-wd4820)
# disable warning C4668: 'symbol' is not defined as preprocessor macro,
Expand All @@ -78,6 +94,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
iotjs_add_compile_flags(-wd4668)
# disable warning C4100: unreferenced formal parameter
iotjs_add_compile_flags(-wd4100)
iotjs_add_compile_flags(-wd4242)
iotjs_add_compile_flags(-wd4244)
iotjs_add_compile_flags(-wd4996)
iotjs_add_compile_flags(-wd4061)
iotjs_add_compile_flags(-wd5045)
iotjs_add_compile_flags(-wd4701)
iotjs_add_compile_flags(-wd4710)
endif()

CHECK_C_COMPILER_FLAG(-no-pie HAS_NO_PIE)
Expand All @@ -88,8 +111,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(HAS_NO_PIE AND NOT "${TARGET_OS}" STREQUAL "darwin")
iotjs_add_link_flags(-no-pie)
endif()
else()

elseif(HAS_NO_PIE)
iotjs_add_compile_flags(-fPIE)
if("${TARGET_OS}" STREQUAL "darwin")
iotjs_add_link_flags(-Wl,-pie)
Expand All @@ -98,7 +120,7 @@ else()
endif()
endif()

if (CREATE_SHARED_LIB)
if (CREATE_SHARED_LIB AND NOT USING_MSVC)
iotjs_add_compile_flags(-fPIC)
endif()

Expand Down Expand Up @@ -180,10 +202,6 @@ elseif("${TARGET_OS}" STREQUAL "tizenrt")
iotjs_add_compile_flags(-D__TIZENRT__ -Os -fno-strict-aliasing)
iotjs_add_compile_flags(-fno-strength-reduce -fomit-frame-pointer)
elseif("${TARGET_OS}" STREQUAL "windows")
message("Windows support is experimental!")
if(NOT EXPERIMENTAL)
message(FATAL_ERROR "Missing --experimental build option for Windows!")
endif()
elseif("${TARGET_OS}" STREQUAL "openwrt")
message("OpenWrt support is experimental!")
if(NOT EXPERIMENTAL)
Expand Down
43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

2 changes: 0 additions & 2 deletions cmake/JSONParser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

cmake_minimum_required(VERSION 2.8)

if (DEFINED JSonParserGuard)
return()
endif()
Expand Down
Loading