Skip to content

Commit

Permalink
Merge branch 'AntelopeIO:main' into removed_leftover_comment
Browse files Browse the repository at this point in the history
  • Loading branch information
systemzax authored Aug 22, 2024
2 parents d5cc245 + 6b98462 commit d6e81c0
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .cicd/defaults.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spring-dev":{
"antelope-spring-dev":{
"target":"main",
"prerelease":false
}
Expand Down
14 changes: 0 additions & 14 deletions .cicd/platforms.json

This file was deleted.

96 changes: 34 additions & 62 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
pull_request:
workflow_dispatch:
inputs:
override-spring-dev:
description: Override spring-dev target
override-antelope-spring-dev:
description: Override antelope-spring-dev target
type: string
override-spring-dev-prerelease:
override-antelope-spring-dev-prerelease:
type: choice
description: Override spring-dev prelease
description: Override antelope-spring-dev prelease
options:
- default
- true
Expand All @@ -28,97 +28,69 @@ defaults:
shell: bash

jobs:
d:
name: Discover Platforms
runs-on: ubuntu-latest
outputs:
missing-platforms: ${{steps.discover.outputs.missing-platforms}}
p: ${{steps.discover.outputs.platforms}}
steps:
- name: Discover Platforms
id: discover
uses: AntelopeIO/discover-platforms-action@v1
with:
platform-file: .cicd/platforms.json
password: ${{secrets.GITHUB_TOKEN}}
package-name: builders
build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ["self-hosted", "enf-x86-beefy"]
steps:
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}
platform-cache:
name: Platform Cache
uses: AntelopeIO/platform-cache-workflow/.github/workflows/platformcache.yaml@v1
permissions:
packages: write
contents: read
with:
runs-on: '["self-hosted", "enf-x86-beefy"]'
platform-files: .cicd/platforms

versions:
name: Determine Versions
runs-on: ubuntu-latest
outputs:
spring-dev-target: ${{steps.versions.outputs.spring-dev-target}}
spring-dev-prerelease: ${{steps.versions.outputs.spring-dev-prerelease}}
antelope-spring-dev-target: ${{steps.versions.outputs.antelope-spring-dev-target}}
antelope-spring-dev-prerelease: ${{steps.versions.outputs.antelope-spring-dev-prerelease}}
steps:
- name: Setup versions from input or defaults
id: versions
env:
GH_TOKEN: ${{github.token}}
run: |
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
echo spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."spring-dev".target') >> $GITHUB_OUTPUT
echo spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."spring-dev".prerelease') >> $GITHUB_OUTPUT
echo antelope-spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".target') >> $GITHUB_OUTPUT
echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT
if [[ "${{inputs.override-spring-dev}}" != "" ]]; then
echo spring-dev-target=${{inputs.override-spring-dev}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-antelope-spring-dev}}" != "" ]]; then
echo antelope-spring-dev-target=${{inputs.override-antelope-spring-dev}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-spring-dev-prerelease}}" == +(true|false) ]]; then
echo spring-dev-prerelease=${{inputs.override-spring-dev-prerelease}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-antelope-spring-dev-prerelease}}" == +(true|false) ]]; then
echo antelope-spring-dev-prerelease=${{inputs.override-antelope-spring-dev-prerelease}} >> $GITHUB_OUTPUT
fi
Build:
name: Build & Test
needs: [d, build-platforms, versions]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
needs: [platform-cache, versions]
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22, ubuntu22-llvm, ubuntu24]
runs-on: ["self-hosted", "enf-x86-beefy"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
container: ${{fromJSON(needs.platform-cache.outputs.platforms)[matrix.platform].image}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Download spring-dev.deb (Ubuntu 22 only)
- name: Download antelope-spring-dev.deb (Ubuntu 22 only)
if: matrix.platform == 'ubuntu22'
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: AntelopeIO
repo: spring
file: 'spring-dev.*ubuntu22\.04_amd64.deb'
target: '${{needs.versions.outputs.spring-dev-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.spring-dev-prerelease)}}
artifact-name: spring-dev-ubuntu22-amd64
container-package: experimental-binaries
- name: Install spring-dev.deb (Ubuntu 22 only)
file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb'
target: '${{needs.versions.outputs.antelope-spring-dev-target}}'
prereleases: ${{fromJSON(needs.versions.outputs.antelope-spring-dev-prerelease)}}
artifact-name: antelope-spring-dev-ubuntu22-amd64
container-package: antelope-spring-experimental-binaries
- name: Install antelope-spring-dev.deb (Ubuntu 22 only)
if: matrix.platform == 'ubuntu22'
run: |
apt-get update && apt-get upgrade -y
apt install -y ./spring-dev*.deb
rm ./spring-dev*.deb
apt install -y ./antelope-spring-dev*.deb
rm ./antelope-spring-dev*.deb
- name: Build & Test
run: |
mkdir build
Expand All @@ -134,7 +106,7 @@ jobs:
bash generate_package.sh deb ubuntu amd64
- name: Upload (Ubuntu 20 only)
if: matrix.platform == 'ubuntu20'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cdt_ubuntu_package_amd64
path: build/packages/cdt*amd64.deb
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ project(cdt)
set(VERSION_MAJOR 4)
set(VERSION_MINOR 1)
set(VERSION_PATCH 1)
set(VERSION_SUFFIX "")
set(VERSION_SUFFIX "dev")

if (VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ sudo apt remove cdt

## Building from source

Recent Ubuntu LTS releases are the only Linux distributions that we fully support. Other Linux distros and other POSIX operating systems (such as macOS) are tended to on a best-effort basis and may not be full featured.
Recent Ubuntu LTS releases are the only Linux distributions that we fully support. Other Linux distros and other POSIX operating systems (such as macOS) are tended to on a best-effort basis and may not be full featured.

The instructions below assume that you are building on Ubuntu 20.04.
The instructions below assume that you are building on Ubuntu 20.04.

### Install dependencies

Expand Down Expand Up @@ -136,7 +136,7 @@ Installing CDT globally on your system will install the following tools in a loc
* cdt-strip
* eosio-pp
* eosio-wasm2wast
* eosio-wast2wasm
* eosio-wast2wasm

It will also install CMake files for CDT accessible within a `cmake/cdt` directory located within your system's `lib` directory.
#### Manual installation
Expand Down
56 changes: 0 additions & 56 deletions libraries/eosiolib/capi/eosio/security_group.h

This file was deleted.

86 changes: 0 additions & 86 deletions libraries/eosiolib/contracts/eosio/security_group.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions libraries/eosiolib/contracts/eosio/singleton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace eosio {
* @return true - if exists
* @return false - otherwise
*/
bool exists() {
bool exists() const {
return _t.find( pk_value ) != _t.end();
}

Expand All @@ -72,7 +72,7 @@ namespace eosio {
* @brief Get the value stored inside the singleton table
* @return T - The value stored
*/
T get() {
T get() const {
auto itr = _t.find( pk_value );
eosio::check( itr != _t.end(), "singleton does not exist" );
return itr->value;
Expand All @@ -84,7 +84,7 @@ namespace eosio {
* @param def - The default value to be returned in case the data doesn't exist
* @return T - The value stored
*/
T get_or_default( const T& def = T() ) {
T get_or_default( const T& def = T() ) const {
auto itr = _t.find( pk_value );
return itr != _t.end() ? itr->value : def;
}
Expand Down
16 changes: 0 additions & 16 deletions libraries/native/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,22 +890,6 @@ extern "C" {
}
#pragma clang diagnostic pop

int64_t add_security_group_participants(const char* data, uint32_t datalen) {
return intrinsics::get().call<intrinsics::add_security_group_participants>(data, datalen);
}

int64_t remove_security_group_participants(const char* data, uint32_t datalen){
return intrinsics::get().call<intrinsics::remove_security_group_participants>(data, datalen);
}

bool in_active_security_group(const char* data, uint32_t datalen){
return intrinsics::get().call<intrinsics::in_active_security_group>(data, datalen);
}

uint32_t get_active_security_group(char* data, uint32_t datalen){
return intrinsics::get().call<intrinsics::get_active_security_group>(data, datalen);
}

void set_finalizers(uint64_t packed_finalizer_format, const char* data, uint32_t len) {
intrinsics::get().call<intrinsics::set_finalizers>(packed_finalizer_format, data, len);
}
Expand Down
Loading

0 comments on commit d6e81c0

Please sign in to comment.