Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated config to work on windows & macos #445

Open
wants to merge 54 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
470bc1e
Updated config to work on windows & macos
fayeed Feb 7, 2024
5a6966d
fixed build name
fayeed Feb 7, 2024
5a42c7d
Updated config
fayeed Feb 7, 2024
1b10fc0
Updated cofig for macos
fayeed Feb 7, 2024
1873f98
Update windows config
fayeed Feb 7, 2024
5aa82df
Updated node version
fayeed Feb 7, 2024
91ba23b
fixed key
fayeed Feb 7, 2024
d494b19
removed install-npm key
fayeed Feb 7, 2024
805c80e
updated to latest macos version
fayeed Feb 7, 2024
9f142ed
updated windows machine
fayeed Feb 7, 2024
7049f17
revert back to old windows image
fayeed Feb 7, 2024
507d5af
install rust
fayeed Feb 7, 2024
95ca45d
Fix Rust installation command
fayeed Feb 7, 2024
6ee6346
Fix Rust installation command
fayeed Feb 7, 2024
0c5dd9d
Update Rust installation command
fayeed Feb 7, 2024
eb55d9a
Update node version
fayeed Feb 7, 2024
d17950f
Add installation steps for Go
fayeed Feb 7, 2024
6e3589c
removed restore-cache
fayeed Feb 7, 2024
b5a589e
Update config
fayeed Feb 8, 2024
ebc0caf
Added windows custom ssh key
fayeed Feb 8, 2024
0ca8baa
Removed build dependecies for macos & windows job
fayeed Feb 8, 2024
3646b0d
Update Node.js installation method
fayeed Feb 8, 2024
dd70851
Update CircleCI configuration to install dependencies using choco and…
fayeed Feb 8, 2024
da5469e
Update CircleCI configuration to use Chocolatey for installing Deno a…
fayeed Feb 8, 2024
19b500f
Add installation of Rust via Chocolatey
fayeed Feb 8, 2024
229b945
Add cmake installation step to CircleCI config
fayeed Feb 8, 2024
c03a0ce
Update cmake installation command to add cmake to PATH
fayeed Feb 8, 2024
5ea5764
Remove Rust installation step from CircleCI config
fayeed Feb 8, 2024
ac661de
Update CircleCI configuration to include Python installation
fayeed Feb 8, 2024
088a284
Add python version check to build script
fayeed Feb 8, 2024
1101eb5
Add Python version check to build process
fayeed Feb 8, 2024
65e6f90
Commented out unused jobs in CircleCI config
fayeed Feb 8, 2024
b08aa56
Add node-gyp installation step
fayeed Feb 8, 2024
0e6b85a
Update Node.js version in CircleCI config
fayeed Feb 8, 2024
2505601
Remove installation of node-gyp
fayeed Feb 8, 2024
b69dc64
Update dependencies in CircleCI config.yml
fayeed Feb 8, 2024
202b007
Add npm config and install dependencies
fayeed Feb 8, 2024
9b2253d
Update npm configuration
fayeed Feb 8, 2024
583899b
Update pnpm installation command
fayeed Feb 8, 2024
9322e32
Remove python version check
fayeed Feb 8, 2024
d9eb943
Update pnpm installation command
fayeed Feb 8, 2024
f81e3ce
Update Node.js installation command
fayeed Feb 8, 2024
3953457
Update CircleCI configuration to install pnpm and check Node.js versions
fayeed Feb 8, 2024
8268c9b
Add nvm commands to install and use Node.js version 20.4.0
fayeed Feb 8, 2024
bed4121
Fix typo in nvm install command
fayeed Feb 8, 2024
9932e2a
Update npm version and install pnpm
fayeed Feb 8, 2024
510504b
Update Node.js version to 18.17.0
fayeed Feb 8, 2024
7bb3562
Remove npm install -g npm@latest command
fayeed Feb 8, 2024
d480659
Remove Node.js installation step
fayeed Feb 8, 2024
dd502c9
Update CircleCI configuration to install pnpm and change node version
fayeed Feb 9, 2024
e8a948e
Update CircleCI config to include macOS integration tests
fayeed Feb 9, 2024
b096f84
Add Rust target for WebAssembly
fayeed Feb 9, 2024
2780595
Add command to add wasm32-unknown-unknown target for Rust
fayeed Feb 9, 2024
2d3636d
Add wasm32-unknown-unknown target to Rustup
fayeed Feb 9, 2024
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
207 changes: 198 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ orbs:
node: circleci/[email protected]
go: circleci/[email protected]
rust: circleci/[email protected]
win: circleci/[email protected]
mac: circleci/[email protected]

jobs:
build:
Expand All @@ -29,7 +31,7 @@ jobs:
cd crates/hc
cargo build --release
pwd
ls -la
ls -la
mkdir -p $HOME/.cargo/bin
cd ../../target/release
pwd
Expand Down Expand Up @@ -80,7 +82,7 @@ jobs:
name: Root tests
command: pnpm test

integration-tests-js:
integration-tests-js-linux:
docker:
- image: coasys/ad4m-ci-linux:latest@sha256:7008f587d355d1adeb58553f52f99e1812822b4d21dc78d69bc96040d5e57e82
resource_class: xlarge
Expand Down Expand Up @@ -144,6 +146,191 @@ jobs:
name: Run integration tests
command: cd ./tests/js && pnpm run test-main

integration-tests-js-windows:
executor:
name: win/default
size: xlarge
steps:
- add_ssh_keys:
fingerprints:
- "SHA256:pSp0IbmprP+NHD1iG2+k2xUeJOG1yTzEnfqRLnUCk3c"
- checkout
- run:
name: Install Deno
command: choco install deno
- run:
name: Install Rust
command: choco install rust
- run:
name: Chnage node version
command: |
nvm list
nvm install 18.17.0
nvm use 18.17.0
- run:
name: Install pnpm
command: choco install pnpm
- run:
name: Install cmake
command: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=User'
- run:
name: install dependencies
command: choco install protoc curl cygwin gnuwin32-m4 msys2 make mingw python python2 visualstudio2019community
- run:
name: Verify installations
command: |
refreshenv
rustc --version
node --version
deno --version
pnpm --version
protoc --version
cmake --version
- run:
name: Set npm config
command: |
npm cache clean --force
npm install -g npm@latest
npm config set python python2.7
npm config set msvs_version 2019
- run:
name: Install dependencies
command: pnpm install
- run:
name: Install core dependencies
command: cd ./core && pnpm install
- run:
name: Install HC
command: |
ls -la $HOME/.cargo/bin
if (!(Test-Path "$HOME/.cargo/bin/hc")) {
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
New-Item -ItemType Directory -Force -Path $HOME/.cargo/bin
cd ../../target/release
pwd
ls -lah
Copy-Item -Path hc -Destination $HOME/.cargo/bin/hc
cd $HOME/.cargo/bin
pwd
ls -lah
./hc --version
}
$env:PATH = "$HOME/.cargo/bin;" + $env:PATH
- save_cache:
key: hc-0.3.0-beta-dev-27-v7
paths:
- /home/circleci/.cargo/bin
- run:
name: Build ADAM (without bootstrap languages)
command: pnpm run build-libs
- run:
name: Build bootstrap languages
command: pnpm run build-languages
- run:
name: Run integration tests
command: cd ./tests/js && pnpm run test-main

integration-tests-js-macos:
macos:
xcode: "15.2.0"
steps:
- checkout
- node/install:
node-version: '16.14'
- run:
name: Install Rust
command: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> $BASH_ENV
~/.cargo/bin/rustup target add wasm32-unknown-unknown
- run:
name: Install Go
command: |
curl -O https://dl.google.com/go/go1.20.6.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.20.6.darwin-amd64.tar.gz
echo 'export PATH="/usr/local/go/bin:$PATH"' >> $BASH_ENV
- run:
name: Install Deno
command: |
curl -fsSL https://deno.land/x/install/install.sh | sh
echo 'export PATH="/Users/distiller/.deno/bin:$PATH"' >> $BASH_ENV
- run:
name: Install pnpm
command: npm install -g pnpm
- run:
name: Install Protobuf and CMake
command: brew install protobuf cmake
- run:
name: Verify installations
command: |
rustc --version
node --version
deno --version
pnpm --version
protoc --version
cmake --version
python --version
- 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
- 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 ADAM (without bootstrap languages)
command: pnpm run build-libs
- save_cache:
key: rust-cache-{{ checksum "Cargo.lock" }}-v2
paths:
- ./target
- ~/.cargo/registry
- ~/.cargo/git
- run:
name: Build bootstrap languages
command: pnpm run build-languages
- 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
Expand All @@ -164,10 +351,12 @@ workflows:
version: 2
build-and-test:
jobs:
- build
- unit-tests:
requires:
- build
- integration-tests-js:
requires:
- build
# - build
# - unit-tests:
# requires:
# - build
# - integration-tests-js-linux:
# requires:
# - build
# - integration-tests-js-windows
- integration-tests-js-macos