Skip to content

Commit

Permalink
v1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Oct 15, 2024
0 parents commit 13342ec
Show file tree
Hide file tree
Showing 1,319 changed files with 206,046 additions and 0 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build/release

on:
push:
# Sequence of patterns matched against refs/heads
branches:
- "dev"
- "main"
tags:
- "*"
pull_request:
branches:
- "dev"

jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: true

strategy:
matrix:
include:
- os: ubuntu-20.04
arch: x64
- os: ubuntu-20.04
arch: ia32
- os: ubuntu-20.04
arch: arm64
- os: ubuntu-20.04
arch: arm
- os: ubuntu-20.04
arch: mips64
- os: ubuntu-20.04
arch: ppc64
- os: ubuntu-20.04
arch: riscv64
- os: ubuntu-20.04
arch: loong64
- os: ubuntu-20.04
target: alpine
arch: x64
- os: ubuntu-20.04
target: alpine
arch: ia32
- os: ubuntu-20.04
target: alpine
arch: arm64
- os: ubuntu-20.04
target: android
arch: x64
- os: ubuntu-20.04
target: android
arch: ia32
- os: ubuntu-20.04
target: android
arch: arm64
- os: ubuntu-20.04
target: android
arch: arm
- os: windows-2022
arch: x64
- os: windows-2022
arch: ia32
- os: windows-2022
arch: arm64
- os: macos-14
arch: x64
- os: macos-14
arch: arm64
- os: macos-14
target: iphone
arch: arm64
- os: macos-14
target: iphone
arch: x64

steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Setup the environment
shell: bash
run: . ./fib-addon/build_tools/scripts/actions-env.sh
env:
BUILD_TARGET: ${{ matrix.target }}
BUILD_ARCH: ${{ matrix.arch }}

- name: Build the project
shell: bash
run: |
set -ev
bash build -j2 ${BUILD_ARCH} ${BUILD_TARGET} ${BUILD_TYPE}
if [[ "$BUILD_TAG" != "" ]]; then
tar -zcf ${BUILD_NAME}-${BUILD_TARGET}-${BUILD_ARCH}-${BUILD_TYPE}.tar.gz addon/${BUILD_NAME}.node
fi
- name: Release the project
if: env.BUILD_TAG != ''
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.BUILD_NAME }}-${{ env.BUILD_TARGET }}-${{ env.BUILD_ARCH }}-${{ env.BUILD_TYPE }}.tar.gz
tag: ${{ env.BUILD_TAG }}
overwrite: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/out
/bin
/addon
/temp/*
/test/inject.exe
/.vscode/launch.json
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "build_tools"]
path = build_tools
url = https://github.com/fibjs/build_tools.git
[submodule "node-addon-api"]
path = node-addon-api
url = https://github.com/nodejs/node-addon-api.git
[submodule "fib-addon"]
path = fib-addon
url = https://github.com/fibjs/fib-addon.git
75 changes: 75 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Place your settings in this file to overwrite the default settings
{
"editor.formatOnSave": true,
"C_Cpp.clang_format_sortIncludes": false,
"C_Cpp.clang_format_fallbackStyle": "WebKit",
"files.associations": {
"map": "cpp",
"functional": "cpp",
"string": "cpp",
"vector": "cpp",
"__bit_reference": "cpp",
"__config": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__verbose_abort": "cpp",
"any": "cpp",
"array": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"execution": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string_view": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"valarray": "cpp",
"variant": "cpp",
"algorithm": "cpp",
"codecvt": "cpp"
}
}
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "bash",
"args": [
"build",
"-j"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
32 changes: 32 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 2.6)

option(LIEF_DOC "Build LIEF docs" OFF)
option(LIEF_C_API "C API" OFF)
option(LIEF_PYTHON_API "Build LIEF Python API" OFF)
option(LIEF_ENABLE_JSON "Enable JSON-related APIs" OFF)
option(LIEF_EXAMPLES "Build LIEF examples" OFF)
option(LIEF_TESTS "Build LIEF tests" OFF)
option(LIEF_ART "Build LIEF with ART module" OFF)
option(LIEF_DEX "Build LIEF with DEX module" OFF)
option(LIEF_VDEX "Build LIEF with VDEX module" OFF)
option(LIEF_OAT "Build LIEF with OAT module" OFF)
option(LIEF_OPT_MBEDTLS_EXTERNAL "Use external mbedTLS" OFF)

if(MSVC)
set(LIEF_USE_CRT_RELEASE "MT" CACHE STRING "LIEF CRT option")
endif()

add_subdirectory(vender/LIEF)

include(fib-addon/common.cmake)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/vender/LIEF/include
${CMAKE_CURRENT_BINARY_DIR}/vender/LIEF/include
)

add_dependencies(${name} LIB_LIEF)
target_link_libraries(${name} LIB_LIEF)

add_executable(test test/test.c)
set_target_properties(test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin OUTPUT_NAME test)
4 changes: 4 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

. fib-addon/build_tools/scripts/build_env.sh
. fib-addon/build_tools/scripts/build
3 changes: 3 additions & 0 deletions build.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.0)

include(fib-addon/build.cmake)
3 changes: 3 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

fib-addon/build_tools/scripts/build %*%
1 change: 1 addition & 0 deletions fib-addon
Submodule fib-addon added at 8a18b5
Loading

0 comments on commit 13342ec

Please sign in to comment.