Skip to content

Commit

Permalink
Try just modifying the build file (jupyter-server#48)
Browse files Browse the repository at this point in the history
* try just modifying the build file

* clean up build config

* get check manifest from pip

* update

* cleanup

* whoops

* figure out where cache is

* clean up and add caching

* add conda cache

* do not cache conda
  • Loading branch information
Steve Silvester authored and GitHub Enterprise committed Aug 4, 2021
1 parent cb58b4d commit 83c4bd3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 16 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ include LICENSE
include README.md
include RELEASE.md
include pyproject.toml
include *.txt
include *.yml
include condarc
recursive-include jupyter-config *.json

include package.json
Expand Down
39 changes: 28 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
#!/bin/bash
set -ex

cd /workspace

echo "++++++++++++++++++++CI SETUP+++++++++++++++++++++++++++++++++++"
export NODE_OPTIONS="--max-old-space-size=4096"
export NPM_CONFIG_CAFILE="/etc/ssl/certs/ca-certificates.crt"
echo "Installing packages"
if test -f './ci' ; then
eval $(./ci install-runtime ${PYTHON_VERSION} node)
else
eval $(ci install-runtime ${PYTHON_VERSION} node)
fi
printf "capath=/etc/ssl/certs/\ncacert=${NPM_CONFIG_CAFILE}\n" >> ~/.curlrc
export CONDARC="${PWD}/condarc"
export NPM_VERSION=7.18.1
export PIP_INDEX_URL=https://pypi.apple.com/simple
export PIP_CACHE_DIR=${CI_CACHE_DIR}/pip

curl https://artifacts.apple.com/conda-dist/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh --output miniconda.sh
bash miniconda.sh -b -p ./miniconda
rm miniconda.sh
source "./miniconda/etc/profile.d/conda.sh"

hash -r

printf "capath=/etc/ssl/certs/\ncacert=/etc/ssl/certs/ca-certificates.crt\n" >> ~/.curlrc
conda update -q conda
conda info -a

echo "++++++++++++++++++++INSTALL+++++++++++++++++++++++++++++++++++"
npm set progress=false
conda env create -f environment.yml
conda activate data_studio_jupyter_extensions

npm config set progress=false --userconfig .npmrc
npm config set cache=${CI_CACHE_DIR}/npm --userconfig .npmrc
npm install -g npm@${NPM_VERSION}
npm install -g yarn
yarn config set no-progress
yarn config set cache-folder ${CI_CACHE_DIR}/yarn
node -v
which npm
npm -v

which python
python -V
which pip
pip config --user set global.progress_bar off
python -m pip install --upgrade pip

pip install check-manifest

echo "+++++++++++++++++++++++++PYTHON++++++++++++++++++++++++++++++"
make install
Expand All @@ -35,3 +49,6 @@ echo "++++++++++++++++++++NPM+++++++++++++++++++++++++++++++++++"
yarn
yarn build
yarn test

echo "+++++++++++++++++++++++++INTEGRITY++++++++++++++++++++++++++++++"
check-manifest -v
9 changes: 9 additions & 0 deletions condarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
channel_alias: https://conda.apple.com
channels:
- https://conda.apple.com
- https://artifacts.apple.com/api/conda/anaconda-free
default_channels:
- https://conda.apple.com
ssl_verify: /etc/ssl/certs/ca-certificates.crt
always_yes: yes
changeps1: no
5 changes: 5 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: data_studio_jupyter_extensions
dependencies:
- python=3.8
- nodejs
- pip
5 changes: 0 additions & 5 deletions rio.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
schemaVersion: 2.0

pipelines:

- branchName: main
build:
template: freestyle:v4:prb
steps:
- ./build.sh
machine:
baseImage: docker.apple.com/rio/fuji-bdz:latest
env:
PYTHON_VERSION: python-3.8.3
NPM_VERSION: 7.18.1
PIP_INDEX_URL: https://pypi.apple.com/simple

0 comments on commit 83c4bd3

Please sign in to comment.