-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #472 from coasys/dev
Release v0.9.0
- Loading branch information
Showing
246 changed files
with
23,063 additions
and
10,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Use the CircleCI base image | ||
FROM cimg/base:edge-22.04 | ||
|
||
USER root | ||
|
||
# Install system dependencies or any other tools you need | ||
RUN apt-get update && sudo apt-get install -y \ | ||
libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf protobuf-compiler cmake | ||
|
||
# Install Go | ||
ENV GO_VERSION 1.22.0 | ||
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz -O go.tar.gz \ | ||
&& tar -C /usr/local -xzf go.tar.gz \ | ||
&& rm go.tar.gz | ||
|
||
# Set Go environment variables | ||
ENV GOPATH /go | ||
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH | ||
|
||
# Install Node | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && apt-get install -y nodejs | ||
|
||
|
||
USER circleci | ||
|
||
# Add /usr/local/bin to the PATH for the circleci user | ||
RUN echo 'export PATH="/usr/local/bin:$PATH"' >> $HOME/.bashrc | ||
|
||
# Install Rust | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
RUN echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> /home/circleci/.bashrc | ||
RUN ~/.cargo/bin/rustup target add wasm32-unknown-unknown | ||
|
||
# Install Deno | ||
RUN curl -fsSL https://deno.land/install.sh | sh | ||
RUN echo 'export DENO_INSTALL="/home/circleci/.deno"' >> /home/circleci/.bashrc | ||
RUN echo 'export PATH="/home/circleci/.deno/bin:$PATH"' >> /home/circleci/.bashrc | ||
|
||
# Configure npm to use a directory in the circleci user's home for global packages | ||
RUN mkdir ~/.npm-global \ | ||
&& npm config set prefix '~/.npm-global' \ | ||
&& echo 'export PATH="~/.npm-global/bin:$PATH"' >> /home/circleci/.bashrc | ||
|
||
# Install pnpm | ||
RUN npm install -g pnpm | ||
|
||
# Add other setup commands you require | ||
|
||
USER root | ||
# Clean up to reduce image size | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Switch back to the circleci user for any non-root actions | ||
USER circleci | ||
|
||
# Set the PATH environment variable | ||
ENV PATH="/home/circleci/.cargo/bin:/home/circleci/.deno/bin:/home/circleci/.npm-global/bin:$PATH" | ||
|
||
# We need killall for the CLI tests | ||
USER root | ||
RUN apt-get update && apt-get install psmisc | ||
USER circleci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
go: circleci/[email protected] | ||
rust: circleci/[email protected] | ||
|
||
jobs: | ||
build-and-test: | ||
docker: | ||
- image: coasys/ad4m-ci-linux:latest@sha256:7008f587d355d1adeb58553f52f99e1812822b4d21dc78d69bc96040d5e57e82 | ||
resource_class: xlarge | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- hc-0.3.0-beta-dev-27-v7 | ||
- hc- | ||
- rust-cache-{{ checksum "Cargo.lock" }} | ||
- rust-cache- | ||
- run: | ||
name: Install HC | ||
command: | | ||
ls -la $HOME/.cargo/bin | ||
if [ ! -f "$HOME/.cargo/bin/hc" ]; then | ||
git clone https://github.com/holochain/holochain.git | ||
cd holochain | ||
git checkout holochain-0.3.0-beta-dev.27 | ||
cd crates/hc | ||
cargo build --release | ||
pwd | ||
ls -la | ||
mkdir -p $HOME/.cargo/bin | ||
cd ../../target/release | ||
pwd | ||
ls -lah | ||
cp hc $HOME/.cargo/bin/hc | ||
cd $HOME/.cargo/bin | ||
pwd | ||
ls -lah | ||
./hc --version | ||
fi | ||
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> $BASH_ENV | ||
- save_cache: | ||
key: hc-0.3.0-beta-dev-27-v7 | ||
paths: | ||
- /home/circleci/.cargo/bin | ||
- restore_cache: | ||
keys: | ||
- rust-cache-{{ checksum "Cargo.lock" }}-v2 | ||
- rust-cache- | ||
- run: | ||
name: Install dependencies | ||
command: pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Build dapp | ||
command: pnpm build-dapp | ||
- run: | ||
name: Install core dependencies | ||
command: cd ./core && pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Build ADAM (without bootstrap languages) | ||
command: pnpm run build-libs | ||
- save_cache: | ||
key: rust-cache-{{ checksum "Cargo.lock" }}-v2 | ||
paths: | ||
- ./target | ||
- ~/.cargo/registry | ||
- ~/.cargo/git | ||
- persist_to_workspace: | ||
no-output-timeout: 30m | ||
root: . | ||
paths: | ||
- ./target/release/ad4m | ||
- ./target/release/ad4m-executor | ||
- run: | ||
name: Remove pnpm patches | ||
command: node removePnpm.js | ||
- run: | ||
name: Install dependencies | ||
command: pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Install core dependencies | ||
command: cd ./core && pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Root tests | ||
command: pnpm test | ||
|
||
integration-tests-js: | ||
docker: | ||
- image: coasys/ad4m-ci-linux:latest@sha256:7008f587d355d1adeb58553f52f99e1812822b4d21dc78d69bc96040d5e57e82 | ||
resource_class: xlarge | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- hc-0.3.0-beta-dev-27-v7 | ||
- hc- | ||
- restore_cache: | ||
keys: | ||
- agent-language-rust-cache-{{ checksum "bootstrap-languages/agent-language/hc-dna/Cargo.lock" }} | ||
- agent-language-rust-cache- | ||
- restore_cache: | ||
keys: | ||
- direct-message-language-rust-cache-{{ checksum "bootstrap-languages/direct-message-language/hc-dna/Cargo.lock" }} | ||
- direct-message-language-rust-cache- | ||
- restore_cache: | ||
keys: | ||
- file-storage-rust-cache-{{ checksum "bootstrap-languages/file-storage/hc-dna/Cargo.lock" }} | ||
- file-storage-rust-cache- | ||
- restore_cache: | ||
keys: | ||
- p-diff-sync-rust-cache-{{ checksum "bootstrap-languages/p-diff-sync/hc-dna/Cargo.lock" }} | ||
- p-diff-sync-rust-cache- | ||
- restore_cache: | ||
keys: | ||
- p-diff-sync-socket-signaling-rust-cache-{{ checksum "bootstrap-languages/p-diff-sync-socket-signaling/hc-dna/Cargo.lock" }} | ||
- p-diff-sync-socket-signaling-rust-cache- | ||
- run: | ||
name: Install dependencies | ||
command: pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Install core dependencies | ||
command: cd ./core && pnpm install --no-frozen-lockfile | ||
- run: | ||
name: Build bootstrap languages | ||
command: pnpm run build-languages | ||
- save_cache: | ||
key: agent-language-rust-cache-{{ checksum "bootstrap-languages/agent-language/hc-dna/Cargo.lock" }} | ||
paths: | ||
- ./bootstrap-languages/agent-language/hc-dna/target | ||
- save_cache: | ||
key: direct-message-language-rust-cache-{{ checksum "bootstrap-languages/direct-message-language/hc-dna/Cargo.lock" }} | ||
paths: | ||
- ./bootstrap-languages/direct-message-language/hc-dna/target | ||
- save_cache: | ||
key: file-storage-rust-cache-{{ checksum "bootstrap-languages/file-storage/hc-dna/Cargo.lock" }} | ||
paths: | ||
- ./bootstrap-languages/file-storage-language/hc-dna/target | ||
- save_cache: | ||
key: p-diff-sync-rust-cache-{{ checksum "bootstrap-languages/p-diff-sync/hc-dna/Cargo.lock" }} | ||
paths: | ||
- ./bootstrap-languages/p-diff-sync/hc-dna/target | ||
- save_cache: | ||
key: p-diff-sync-socket-signaling-rust-cache-{{ checksum "bootstrap-languages/p-diff-sync-socket-signaling/hc-dna/Cargo.lock" }} | ||
paths: | ||
- ./bootstrap-languages/p-diff-sync-socket-signaling/hc-dna/target | ||
- run: | ||
name: Run integration tests | ||
command: cd ./tests/js && pnpm run test-main | ||
|
||
integration-tests-cli: | ||
docker: | ||
- image: coasys/ad4m-ci-linux:latest@sha256:7008f587d355d1adeb58553f52f99e1812822b4d21dc78d69bc96040d5e57e82 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: git submodule | ||
command: git submodule update --init --recursive | ||
- run: | ||
name: Run binaries test script | ||
command: ./tests/bats/bin/bats tests/binaries.bats | ||
- run: | ||
name: Run integration test script | ||
command: ./tests/bats/bin/bats tests/integration.bats | ||
|
||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- build-and-test | ||
- integration-tests-js: | ||
requires: | ||
- build-and-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.