Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now we have deps-apt: apt packages deps-py and deps-R: PyPI and CRAN packages deps-tar going into /app/oil_DEPS The /app/oil_DEPS thing works on the 'cpp' task. Now need to fix 'ovm-tarball'.
- Loading branch information
Andy C
committed
Dec 11, 2021
1 parent
370de7b
commit 808a697
Showing
13 changed files
with
238 additions
and
246 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Usage: | ||
# ./deps-R.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
other-tests() { | ||
readonly R_PATH=~/R # duplicates what's in test/common.sh | ||
|
||
# Install to a directory that doesn't require root. This requires setting | ||
# R_LIBS_USER. Or library(dplyr, lib.loc = "~/R", but the former is preferable. | ||
mkdir -p ~/R | ||
|
||
# Note: dplyr 1.0.3 as of January 2021 made these fail on Xenial. See R 4.0 | ||
# installation below. | ||
INSTALL_DEST=$R_PATH Rscript -e 'install.packages(c("dplyr", "tidyr", "stringr"), lib=Sys.getenv("INSTALL_DEST"), repos="https://cloud.r-project.org")' | ||
} | ||
|
||
"$@" |
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,113 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Usage: | ||
# ./deps-apt.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
dummy() { | ||
# gcc: time-helper is needed | ||
# git: for checking out code | ||
# python2: for various tools | ||
apt-get install -y gcc git python2 | ||
} | ||
|
||
dev-minimal() { | ||
local -a packages=( | ||
# common | ||
git python2 | ||
|
||
libreadline-dev | ||
procps # pgrep used by test/interactive | ||
gawk | ||
|
||
python2-dev # for building Python extensions | ||
|
||
python-pip # flake8 typing | ||
python3-setuptools # mypy | ||
python3-pip | ||
|
||
# Note: osh-minimal task needs shells; not using spec-bin for now | ||
busybox-static mksh zsh | ||
) | ||
|
||
apt-get install -y "${packages[@]}" | ||
|
||
} | ||
|
||
other-tests() { | ||
local -a packages=( | ||
# common | ||
git python2 | ||
|
||
libreadline-dev | ||
python2-dev # osh2oil needs build/dev.sh minimal | ||
|
||
python3 # for py3-parse | ||
|
||
r-base-core # for r-libs | ||
) | ||
|
||
apt-get install -y "${packages[@]}" | ||
} | ||
|
||
cpp() { | ||
local -a packages=( | ||
# common | ||
git python2 | ||
|
||
# retrieving deps -- TODO: move to build time | ||
wget | ||
|
||
# line_input.so needs this | ||
libreadline-dev | ||
python2-dev | ||
|
||
python3-pip | ||
# for MyPy virtualenv for requirements.txt -- TODO: move to build time. | ||
python3-venv | ||
|
||
ninja-build | ||
# to create mycpp/_ninja/index.html | ||
gawk | ||
|
||
# for stable benchmarks | ||
valgrind | ||
# the shell benchmarks compare shells | ||
busybox-static mksh zsh | ||
) | ||
|
||
apt-get install -y "${packages[@]}" | ||
} | ||
|
||
ovm-tarball() { | ||
local -a packages=( | ||
# common | ||
gcc git python2 | ||
|
||
# This is a separate package needed for re2c. TODO: remove when we've | ||
# built it into the image. | ||
g++ | ||
|
||
# line_input.so needs this | ||
libreadline-dev | ||
python2-dev | ||
|
||
# retrieving deps -- TODO: move to build time | ||
wget | ||
# for syscall measurements | ||
strace | ||
|
||
# for cmark and yajl | ||
cmake | ||
|
||
# test/spec-runner.sh needs this | ||
gawk | ||
) | ||
|
||
apt-get install -y "${packages[@]}" | ||
} | ||
|
||
"$@" |
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,20 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Usage: | ||
# ./deps-py.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
dev-minimal() { | ||
# Python 2 packages for linting linting Python 2 code. | ||
pip install --user flake8 typing | ||
|
||
# Python 3 packages | ||
# - MyPy requires Python 3 | ||
# - pexpect is for test/interactive.py | ||
pip3 install --user mypy pexpect | ||
} | ||
|
||
"$@" |
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,43 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Usage: | ||
# ./deps-tar.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
REPO_ROOT=$(cd $(dirname $0)/.. && pwd) | ||
readonly REPO_ROOT | ||
|
||
DEPS_DIR=$REPO_ROOT/../oil_DEPS | ||
readonly DEPS_DIR | ||
|
||
download-re2c() { | ||
# local cache of remote files | ||
mkdir -p _cache | ||
wget --no-clobber --directory _cache \ | ||
https://github.com/skvadrik/re2c/releases/download/1.0.3/re2c-1.0.3.tar.gz | ||
} | ||
|
||
build-re2c() { | ||
cd $REPO_ROOT/_cache | ||
tar -x -z < re2c-1.0.3.tar.gz | ||
|
||
mkdir -p $DEPS_DIR/re2c | ||
cd $DEPS_DIR/re2c | ||
$REPO_ROOT/_cache/re2c-1.0.3/configure | ||
make | ||
} | ||
|
||
cpp() { | ||
download-re2c | ||
build-re2c | ||
} | ||
|
||
ovm-tarball() { | ||
download-re2c | ||
build-re2c | ||
} | ||
|
||
"$@" |
Oops, something went wrong.