Skip to content

Commit 7a662c7

Browse files
committed
Merge commit 'dbf4751425bf5a85de0664b367d898936cfd2e54'
2 parents fb2826b + dbf4751 commit 7a662c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3134
-427
lines changed

.github/workflows/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
This page contains some documentation on the workflows for this repository.
33

44
## build_test
5-
The workflow build_test is used to build and test the code (see build_test.yaml). We are using a custom docker image for building and testing the code. You can find the image on our [Docker Hub](https://hub.docker.com/repository/docker/threefolddev/tfchain). The dockerfile build_test.Dockerfile was used to build that image. If the image no longer meets the expectations please follow these steps:
5+
The workflow build_test is used to build and test the code (see build_test.yaml). Notice that the binaries are being cached so that the build process is sped up. Once the binaries are build the pipeline will run both the unit tests and the integration tests. This can take up to 30 minutes. The pipeline is ran on every commit to a PR and also when the PR has been merged with development. PRs should only be merged if the pipeline was green (if all tests passed).
6+
7+
For performance reasons we are using a self hosted runner for running the pipeline. The runner will only run one pipeline at a time which means that all other runs will be queued. As the pipeline is ran on every commit it will thus also queue runs of consecutive pushed commits. We strongly advice to add `[skip ci]` to the commit messages whenever possible (when the run of a pipeline can be skipped). A pipeline can also be canceled [here](https://github.com/threefoldtech/tfchain/actions).
8+
9+
### Docker image
10+
We are using a custom docker image for building and testing the code. You can find the image on our [Docker Hub](https://hub.docker.com/repository/docker/threefolddev/tfchain). The dockerfile build_test.Dockerfile was used to build that image. If the image no longer meets the expectations please follow these steps:
611

712
1) Update the dockerfile as required (add what you need)
813
2) Build the new image (execute the comment with .github/workflows as working directory and make sure to increment the version):
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM ubuntu:20.04
22
ENV DEBIAN_FRONTEND=noninteractive
3-
COPY clean_disk_space.sh clean_disk_space.sh
4-
RUN apt-get update && \
5-
apt-get install -y \
3+
RUN apt update && \
4+
apt install -y \
65
build-essential \
76
clang \
87
cmake \
@@ -12,16 +11,20 @@ RUN apt-get update && \
1211
libclang-dev \
1312
lld \
1413
lldb \
15-
python3 \
16-
python3-pip \
14+
software-properties-common \
1715
tar \
1816
zstd && \
17+
add-apt-repository ppa:deadsnakes/ppa && \
18+
apt install -y python3.10 && \
19+
curl https://bootstrap.pypa.io/get-pip.py > get-pip.py && \
20+
python3.10 get-pip.py && \
21+
rm -rf get-pip.py && \
1922
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
2023
$HOME/.cargo/bin/rustup install nightly-2022-05-11 && \
2124
# cleanup image
2225
rm -rf /var/lib/apt/lists/* && \
23-
apt-get clean && \
24-
apt-get autoclean && \
25-
apt-get autoremove && \
26+
apt -y clean && \
27+
apt -y autoclean && \
28+
apt -y autoremove && \
2629
rm -rf /tmp/*
2730
RUN /bin/bash

.github/workflows/build_test.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ jobs:
88
build-and-test:
99
runs-on: [self-hosted, poc]
1010
container:
11-
image: threefolddev/tfchain:0
11+
image: threefolddev/tfchain:1
1212
env:
1313
DEBIAN_FRONTEND: noninteractive
1414
steps:
1515
- uses: actions/checkout@v3
1616

1717
- name: Cache build
1818
uses: actions/cache@v3
19+
timeout-minutes: 6
20+
continue-on-error: true
1921
with:
2022
path: |
2123
~/.cargo/bin/
@@ -26,7 +28,6 @@ jobs:
2628
key: ${{ runner.os }}-tfchain-cargo-${{ hashFiles('**/Cargo.lock') }}
2729
restore-keys: ${{ runner.os }}-tfchain-cargo-
2830

29-
3031
- name: Build
3132
run: |
3233
cd substrate-node
@@ -39,3 +40,10 @@ jobs:
3940
$HOME/.cargo/bin/cargo +nightly-2022-05-11 test --no-fail-fast
4041
cd pallets
4142
$HOME/.cargo/bin/cargo +nightly-2022-05-11 test --no-fail-fast
43+
44+
- name: Integration tests
45+
run: |
46+
python3.10 -m pip install robotframework cryptography substrate-interface
47+
cd substrate-node/tests
48+
robot -d _output_tests/ .
49+

.gitpod.Dockerfile

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitpod.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

ct_scripts/build_fast.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

ct_scripts/install_cli.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

ct_scripts/install_graphql.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

ct_scripts/install_node.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

ct_scripts/install_rust.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

ct_scripts/install_v_rmb.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1. Record architecture decisions
2+
3+
Date: 2022-10-12
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We need to record the architectural decisions made on this project.
12+
13+
## Decision
14+
15+
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
16+
17+
## Consequences
18+
19+
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).

gitpod_readme.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

k8s/staging/certs/staging-cert.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)