Skip to content
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @telosnetwork/telos-core-devs
46 changes: 46 additions & 0 deletions .github/workflows/bootstrap-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Bootstrap Checks

on:
push:
branches:
- main
- "bootstrap/**"
- "release/**"
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
static:
name: Static checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Check shell scripts
run: |
bash -n tools/tweak-deb.sh
sh -n scripts/postinst
sh -n scripts/prerm

- name: Check Perl scripts
run: |
perl -c tools/pinned.pl

- name: Check Python syntax
run: |
python3 -m py_compile \
tests/TestHarness/Node.py \
tests/TestHarness/queries.py \
tests/TestHarness/testUtils.py \
tests/cli_test.py

- name: Check package naming
run: |
grep -Fq 'project( teloszero-core )' CMakeLists.txt
grep -Fq 'CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/TelosNetwork/teloszero-core"' package.cmake
grep -Fq 'teloszero-core_*.deb' tools/reproducible.Dockerfile
28 changes: 13 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: "Build & Test"

# This workflow is inherited from Spring and still requires Telos-owned
# self-hosted runners plus a platform cache workflow. Keep it manual until
# those resources are configured for TelosZero.
on:
push:
branches:
- main
- "release/*"
pull_request:
workflow_dispatch:
inputs:
override-cdt:
Expand Down Expand Up @@ -101,12 +99,12 @@ jobs:
zstdcat build.tar.zst | tar x
cd build
cpack
../tools/tweak-deb.sh antelope-spring_*.deb
../tools/tweak-deb.sh teloszero-core_*.deb
- name: Install dev package
if: matrix.platform != 'reproducible'
run: |
apt-get update && apt-get upgrade -y
apt-get install -y ./build/antelope-spring_*.deb ./build/antelope-spring-dev*.deb
apt-get install -y ./build/teloszero-core_*.deb ./build/teloszero-core-dev*.deb
- name: Test using TestHarness
if: matrix.platform != 'reproducible'
run: |
Expand All @@ -115,15 +113,15 @@ jobs:
uses: actions/upload-artifact@v4
if: matrix.platform != 'reproducible'
with:
name: antelope-spring-dev-${{matrix.platform}}-amd64
path: build/antelope-spring-dev*.deb
name: teloszero-core-dev-${{matrix.platform}}-amd64
path: build/teloszero-core-dev*.deb
compression-level: 0
- name: Upload spring package
- name: Upload TelosZero package
uses: actions/upload-artifact@v4
if: matrix.platform == 'reproducible'
with:
name: antelope-spring-deb-amd64
path: build/antelope-spring_*.deb
name: teloszero-core-deb-amd64
path: build/teloszero-core_*.deb
compression-level: 0

tests:
Expand Down Expand Up @@ -302,12 +300,12 @@ jobs:
run: |
rm -r *
- if: ${{ matrix.test == 'deb-install' }}
name: Download antelope-spring-dev
name: Download teloszero-core-dev
uses: actions/download-artifact@v4
with:
name: antelope-spring-dev-${{matrix.platform}}-amd64
name: teloszero-core-dev-${{matrix.platform}}-amd64
- if: ${{ matrix.test == 'deb-install' }}
name: Install antelope-spring-dev Package
name: Install teloszero-core-dev Package
run: |
apt-get install -y ./*.deb
rm ./*.deb
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_base.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Build spring"
name: "Build TelosZero"

on:
workflow_call:
Expand All @@ -22,7 +22,7 @@ defaults:

jobs:
Build:
name: Build spring
name: Build TelosZero
strategy:
fail-fast: false
matrix:
Expand All @@ -38,12 +38,12 @@ jobs:
run: |
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SPRING_DEV_DEB=On ${SPRING_PLATFORM_HAS_EXTRAS_CMAKE:+-C /extras.cmake} -GNinja
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_TELOSZERO_DEV_DEB=On ${SPRING_PLATFORM_HAS_EXTRAS_CMAKE:+-C /extras.cmake} -GNinja
cmake --build build
tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst
- name: Upload builddir
uses: actions/upload-artifact@v4
with:
name: ${{matrix.platform}}-build
path: build.tar.zst
compression-level: 0
compression-level: 0
42 changes: 6 additions & 36 deletions .github/workflows/jiraIssueCreator.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,12 @@
name: Jira Issue Creator

on:
issues:
types:
- labeled
workflow_dispatch:

# Inherited from Spring. This placeholder keeps the workflow name visible while
# Telos-owned issue automation is configured.
jobs:
create-jira-issue:
disabled:
runs-on: ubuntu-latest
if: github.event.label.name == 'OCI'
steps:
- name: Create json issue file
run: |
cat << EOF > issue.json
{
"fields": {
"project":
{
"key": "$JIRA_PROJECT_KEY"
},
"summary": "$JIRA_ISSUE_SUMMARY",
"description": "$JIRA_ISSUE_DESCRIPTION",
"issuetype": {
"name": "$JIRA_ISSUE_TYPE_NAME"
}
}
}
EOF
env:
JIRA_PROJECT_KEY: ${{ secrets.JIRA_PROJECT_KEY }}
JIRA_ISSUE_SUMMARY: ${{ github.event.issue.title }}
JIRA_ISSUE_DESCRIPTION: "${{ github.event.issue.url }}\\n\\n${{ github.event.issue.html_url }}"
JIRA_ISSUE_TYPE_NAME: "Story"
- name: Check issue json
run: |
cat issue.json
- name: Trigger jira issue creation
run: |
curl -u $JIRA_AUTH -X POST --data @issue.json -H "Content-Type: application/json" --url $JIRA_PROJECT_URL
env:
JIRA_AUTH: ${{ secrets.JIRA_USN_AND_TOKEN }}
JIRA_PROJECT_URL: ${{ secrets.JIRA_PROJECT_URL }}
- run: echo "Jira automation is disabled during TelosZero bootstrap."
20 changes: 7 additions & 13 deletions .github/workflows/label_new_issues.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: Label New Issue

on:
issues:
types: opened
workflow_dispatch:

# Inherited from Spring. This placeholder keeps the workflow name visible while
# Telos-owned project labeling is configured.
jobs:
label_new_issue:
uses: AntelopeIO/issue-project-labeler-workflow/.github/workflows/issue-project-labeler.yaml@v1
with:
issue-id: ${{github.event.issue.node_id}}
label: triage
org-project: 'Team Backlog'
project-field: Status=Todo
skip-if-existing-project: true
secrets:
token: ${{secrets.ENFCIBOT_REPO_AND_PROJECTS}}

disabled:
runs-on: ubuntu-latest
steps:
- run: echo "Issue labeling automation is disabled during TelosZero bootstrap."
18 changes: 9 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ jobs:
packages: write
actions: read
steps:
- name: Get ubuntu20 antelope-spring-dev.deb
- name: Get ubuntu20 teloszero-core-dev.deb
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: ${{github.repository_owner}}
repo: ${{github.event.repository.name}}
file: 'antelope-spring-dev.*amd64.deb'
file: 'teloszero-core-dev.*amd64.deb'
target: ${{github.sha}}
artifact-name: antelope-spring-dev-ubuntu20-amd64
artifact-name: teloszero-core-dev-ubuntu20-amd64
wait-for-exact-target: true
- name: Get ubuntu22 antelope-spring-dev.deb
- name: Get ubuntu22 teloszero-core-dev.deb
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: ${{github.repository_owner}}
repo: ${{github.event.repository.name}}
file: 'antelope-spring-dev.*amd64.deb'
file: 'teloszero-core-dev.*amd64.deb'
target: ${{github.sha}}
artifact-name: antelope-spring-dev-ubuntu22-amd64
artifact-name: teloszero-core-dev-ubuntu22-amd64
wait-for-exact-target: true
- name: Create Dockerfile
run: |
cat <<EOF > Dockerfile
FROM scratch
LABEL org.opencontainers.image.description="A collection of experimental Spring binary packages"
LABEL org.opencontainers.image.description="A collection of experimental TelosZero Core binary packages"
COPY *.deb /
EOF
- name: Login to ghcr
Expand All @@ -45,9 +45,9 @@ jobs:
username: ${{github.repository_owner}}
password: ${{github.token}}
- run: echo "REPOSITORY_OWNER_LOWER=${GITHUB_REPOSITORY_OWNER,,}" >> "${GITHUB_ENV}"
- name: Build and push antelope-spring-experimental-binaries
- name: Build and push teloszero-core-experimental-binaries
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{env.REPOSITORY_OWNER_LOWER}}/antelope-spring-experimental-binaries:${{github.ref_name}}
tags: ghcr.io/${{env.REPOSITORY_OWNER_LOWER}}/teloszero-core-experimental-binaries:${{github.ref_name}}
context: .
20 changes: 6 additions & 14 deletions .github/workflows/submod.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
name: Submodule Check
on: [pull_request]

env:
PR_NUMBER: ${{ toJson(github.event.number) }}
on:
workflow_dispatch:

# Inherited from Spring. The recursive submodule regression check is kept as a
# manual workflow until TelosZero CI policy defines when it should gate PRs.
jobs:
submodule_regression_check:
name: Submodule Regression Check
disabled:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone https://x-access-token:${{github.token}}@github.com/${GITHUB_REPOSITORY} .
git fetch -v --prune origin +refs/pull/${PR_NUMBER}/merge:refs/remotes/pull/${PR_NUMBER}/merge
git checkout --force --progress refs/remotes/pull/${PR_NUMBER}/merge
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Submodule Regression Check
run: ./scripts/submodule-regression-check.sh
- run: echo "Submodule regression check is manual during TelosZero bootstrap."
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@ package-lock.json

snapshots
!unittests/snapshots

teloszero-core-*.tar.zst
teloszero-core_*.deb
23 changes: 12 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required( VERSION 3.16 )

project( antelope-spring )
project( teloszero-core )
include(CTest)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
Expand Down Expand Up @@ -66,7 +66,7 @@ if(ENABLE_OC AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
# can be created with the exact version found
find_package(LLVM REQUIRED CONFIG)
if(LLVM_VERSION_MAJOR VERSION_LESS 7 OR LLVM_VERSION_MAJOR VERSION_GREATER_EQUAL 12)
message(FATAL_ERROR "Spring requires an LLVM version 7 through 11")
message(FATAL_ERROR "TelosZero requires an LLVM version 7 through 11")
endif()
endif()
endif()
Expand Down Expand Up @@ -94,12 +94,12 @@ endif()

if( APPLE AND UNIX )
# Apple Specific Options Here
message( STATUS "Configuring Spring on macOS" )
message( STATUS "Configuring TelosZero on macOS" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-deprecated-declarations" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations" )
else()
# Linux Specific Options Here
message( STATUS "Configuring Spring on Linux" )
message( STATUS "Configuring TelosZero on Linux" )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
if ( FULL_STATIC_BUILD )
Expand Down Expand Up @@ -129,13 +129,13 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wthread-safety" )
endif()

option(EOSIO_ENABLE_DEVELOPER_OPTIONS "enable developer options for Spring" OFF)
option(EOSIO_ENABLE_DEVELOPER_OPTIONS "enable developer options for TelosZero" OFF)

# based on http://www.delorie.com/gnu/docs/gdb/gdb_70.html
# uncomment this line to tell GDB about macros (slows compile times)
# set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gdwarf-2 -g3" )

set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build Spring for code coverage analysis")
set(ENABLE_COVERAGE_TESTING FALSE CACHE BOOL "Build TelosZero for code coverage analysis")

if(ENABLE_COVERAGE_TESTING)
SET(CMAKE_C_FLAGS "--coverage ${CMAKE_C_FLAGS}")
Expand Down Expand Up @@ -168,7 +168,7 @@ message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )
option(ENABLE_TCMALLOC "use tcmalloc (requires gperftools)" OFF)
if( ENABLE_TCMALLOC )
find_package( Gperftools REQUIRED )
message( STATUS "Compiling Spring with TCMalloc")
message( STATUS "Compiling TelosZero with TCMalloc")
#if doing this by the book, simply link_libraries( ${GPERFTOOLS_TCMALLOC} ) here. That will
#give the performance benefits of tcmalloc but since it won't be linked last
#the heap profiler & checker may not be accurate. This here is rather undocumented behavior
Expand All @@ -177,7 +177,7 @@ if( ENABLE_TCMALLOC )
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} ${GPERFTOOLS_TCMALLOC}")
endif()

# spring includes a bundled BoringSSL which conflicts with OpenSSL. Make sure any other bundled libraries (such as boost)
# TelosZero includes a bundled BoringSSL which conflicts with OpenSSL. Make sure any other bundled libraries (such as boost)
# do not attempt to use an external OpenSSL in any manner
set(CMAKE_DISABLE_FIND_PACKAGE_OpenSSL On)

Expand Down Expand Up @@ -212,7 +212,7 @@ configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioCheckVersion.cmake ${CMAKE_
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/leap-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/leap/leap-config.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/leap/EosioTester.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioCheckVersion.cmake ${CMAKE_BINARY_DIR}/lib/cmake/leap/EosioCheckVersion.cmake COPYONLY)
# spring CMake files
# spring-compatible CMake files
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/spring-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/spring/spring-config.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/spring/EosioTester.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioCheckVersion.cmake ${CMAKE_BINARY_DIR}/lib/cmake/spring/EosioCheckVersion.cmake COPYONLY)
Expand All @@ -229,7 +229,7 @@ configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/leap-config.cmake.in ${CMAKE_BIN
install(FILES ${CMAKE_BINARY_DIR}/modules/leap-config.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/leap COMPONENT dev EXCLUDE_FROM_ALL)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/leap COMPONENT dev EXCLUDE_FROM_ALL)
install(FILES ${CMAKE_SOURCE_DIR}/CMakeModules/EosioCheckVersion.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/leap COMPONENT dev EXCLUDE_FROM_ALL)
# spring CMake files
# spring-compatible CMake files
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/spring-config.cmake.in ${CMAKE_BINARY_DIR}/modules/spring-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/spring-config.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/spring COMPONENT dev EXCLUDE_FROM_ALL)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/spring COMPONENT dev EXCLUDE_FROM_ALL)
Expand Down Expand Up @@ -313,7 +313,8 @@ add_custom_target(dev-install

include(doxygen)

option(ENABLE_SPRING_DEV_DEB "Enable building the spring-dev .deb package" OFF)
option(ENABLE_TELOSZERO_DEV_DEB "Enable building the teloszero-core-dev .deb package" OFF)
option(ENABLE_SPRING_DEV_DEB "Compatibility alias for ENABLE_TELOSZERO_DEV_DEB" OFF)

include(package.cmake)
include(CPack)
Loading
Loading