-
Notifications
You must be signed in to change notification settings - Fork 115
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
Update build scripts #2302
Update build scripts #2302
Changes from 7 commits
bce3615
a9411d0
122b093
855b8ab
8732afe
c1d9f88
f91e37d
d9d6762
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ target/ | |
query-node/generated | ||
query-node/**/dist | ||
query-node/lib | ||
cli/ | ||
tests/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ jobs: | |
- name: checks | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn workspace @joystream/types build | ||
yarn workspace @joystream/cd-schemas generate:all | ||
yarn workspace @joystream/cd-schemas build | ||
yarn workspace @joystream/cli build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for building the CLI here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, will drop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in d9d6762 |
||
yarn workspace network-tests checks --quiet | ||
|
||
network_build_osx: | ||
|
@@ -34,4 +38,8 @@ jobs: | |
- name: checks | ||
run: | | ||
yarn install --frozen-lockfile --network-timeout 120000 | ||
yarn workspace @joystream/types build | ||
yarn workspace @joystream/cd-schemas generate:all | ||
yarn workspace @joystream/cd-schemas build | ||
yarn workspace @joystream/cli build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for building the CLI here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no will drop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in d9d6762 |
||
yarn workspace network-tests checks --quiet |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,9 @@ jobs: | |
docker load --input joystream-node-docker-image.tar.gz | ||
docker images | ||
- name: Install packages and dependencies | ||
run: yarn install --frozen-lockfile | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build:packages | ||
- name: Ensure tests are runnable | ||
run: yarn workspace network-tests build | ||
- name: Execute network tests | ||
|
@@ -121,7 +123,9 @@ jobs: | |
docker load --input joystream-node-docker-image.tar.gz | ||
docker images | ||
- name: Install packages and dependencies | ||
run: yarn install --frozen-lockfile | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn build:packages | ||
- name: Ensure tests are runnable | ||
run: yarn workspace network-tests build | ||
- name: Execute network tests | ||
|
@@ -145,7 +149,11 @@ jobs: | |
docker load --input joystream-node-docker-image.tar.gz | ||
docker images | ||
- name: Install packages and dependencies | ||
run: yarn install --frozen-lockfile | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn workspace @joystream/types build | ||
yarn workspace @joystream/cd-schemas generate:all | ||
yarn workspace @joystream/cd-schemas build | ||
- name: Ensure tests are runnable | ||
run: yarn workspace @joystream/cd-schemas checks --quiet | ||
- name: Start chain | ||
|
@@ -171,9 +179,13 @@ jobs: | |
docker load --input joystream-node-docker-image.tar.gz | ||
docker images | ||
- name: Install packages and dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Ensure query-node builds | ||
run: yarn workspace query-node-root build | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn workspace @joystream/types build | ||
yarn workspace @joystream/cd-schemas generate:all | ||
yarn workspace @joystream/cd-schemas build | ||
yarn workspace query-node-root build | ||
yarn workspace @joystream/cli build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for building the CLI here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think query-node tests currently use the cli so will remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in d9d6762 |
||
- name: Ensure tests are runnable | ||
run: yarn workspace network-tests build | ||
# Bring up hydra query-node development instance, then run content directory | ||
|
@@ -199,7 +211,9 @@ jobs: | |
docker load --input joystream-node-docker-image.tar.gz | ||
docker images | ||
- name: Install packages and dependencies | ||
run: yarn install --frozen-lockfile | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn workspace @joystream/types build | ||
- name: Build storage node | ||
run: yarn workspace storage-node build | ||
- name: Start Services | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if ! command -v docker-compose &> /dev/null | ||
then | ||
echo "docker-compose not found. Skipping docker image builds." | ||
exit 0 | ||
fi | ||
|
||
# Build or fetch cached joystream/node docker image | ||
if [[ "$SKIP_JOYSTREAM_NODE" = 1 || "$SKIP_JOYSTREAM_NODE" = "true" ]]; then | ||
echo "Skipping build of joystream/node docker image." | ||
else | ||
# Fetch a cached joystream/node image if one is found matching code shasum instead of building | ||
CODE_HASH=`scripts/runtime-code-shasum.sh` | ||
IMAGE=joystream/node:${CODE_HASH} | ||
echo "Trying to fetch cached ${IMAGE} image" | ||
docker pull ${IMAGE} || : | ||
|
||
if ! docker inspect ${IMAGE} > /dev/null; | ||
then | ||
echo "Fetch failed, building image locally" | ||
docker-compose build joystream-node | ||
else | ||
echo "Tagging cached image as 'latest'" | ||
docker image tag ${IMAGE} joystream/node:latest | ||
fi | ||
fi | ||
|
||
# Build joystream/apps docker image | ||
echo "Building 'joystream/apps' docker image..." | ||
docker-compose build colossus | ||
|
||
# Build the pioneer docker image | ||
echo "Building pioneer docker image" | ||
docker-compose build pioneer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
yarn | ||
yarn workspace @joystream/types build | ||
yarn workspace @joystream/cd-schemas generate:all | ||
yarn workspace @joystream/cd-schemas build | ||
yarn workspace query-node-root build | ||
yarn workspace @joystream/cli build | ||
yarn workspace storage-node build | ||
yarn workspace pioneer build |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to build cd-schemas here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in d9d6762