Skip to content

Commit 4e74924

Browse files
author
Jamie Snape
committed
Add new dependency scripts and add workflows to test
1 parent c232afe commit 4e74924

File tree

10 files changed

+410
-0
lines changed

10 files changed

+410
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: ci
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: '0 5 * * *'
13+
14+
jobs:
15+
macos:
16+
name: macos catalina
17+
runs-on: macos-10.15
18+
steps:
19+
- name: check free space before
20+
run: df -h
21+
shell: zsh -efuo pipefail {0}
22+
- name: checkout
23+
uses: actions/checkout@v2
24+
- name: install brew and pip prerequisites
25+
run: ./install_prereqs --with-pip-install
26+
working-directory: setup/mac
27+
shell: zsh -efuo pipefail {0}
28+
- name: check free space after
29+
run: df -h
30+
shell: zsh -efuo pipefail {0}
31+
32+
ubuntu:
33+
name: ubuntu 18.04
34+
runs-on: ubuntu-latest
35+
container: ubuntu:18.04
36+
steps:
37+
- name: check free space before
38+
run: df -h
39+
shell: bash
40+
- name: checkout
41+
uses: actions/checkout@v2
42+
- name: install apt and pip prerequisites
43+
run: ./install_prereqs --with-pip-install
44+
working-directory: setup/ubuntu
45+
shell: bash
46+
- name: check free space after
47+
run: df -h
48+
shell: bash

.github/workflows/codeql.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: codeql
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: '0 7 * * 3'
13+
14+
jobs:
15+
analyze:
16+
name: analyze
17+
runs-on: ubuntu-18.04
18+
steps:
19+
- name: checkout
20+
uses: actions/checkout@v2
21+
- name: install apt and pip prerequisites
22+
run: sudo ./install_prereqs --with-pip-install
23+
working-directory: setup/ubuntu
24+
shell: bash
25+
- name: codeql init
26+
uses: github/codeql-action/init@v1
27+
with:
28+
languages: python
29+
setup-python-dependencies: false
30+
- name: codeql analyze
31+
uses: github/codeql-action/analyze@v1

LICENSE.TXT

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright 2019 Russ Tedrake and the Massachusetts Institute of Technology.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

setup/mac/Brewfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
brew "bazel"
5+
6+
brew "tidy-html5"

setup/mac/install_prereqs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/zsh
2+
3+
# Copyright 2021 Massachusetts Institute of Technology.
4+
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.
5+
6+
set -euo pipefail
7+
8+
with_pip_install=0
9+
10+
while [ -n "${1:-}" ]; do
11+
case "$1" in
12+
--help)
13+
echo "usage: $0 [--help] [--with-pip-install]" >&2
14+
exit 0
15+
;;
16+
--with-pip-install)
17+
with_pip_install=1
18+
;;
19+
*)
20+
echo "usage: $0 [--help] [--with-pip-install]" >&2
21+
exit 1
22+
;;
23+
esac
24+
shift
25+
done
26+
27+
if [[ "${EUID}" -eq 0 ]]; then
28+
echo 'FATAL: This script must NOT be run as root' >&2
29+
exit 2
30+
fi
31+
32+
# Do not output a file containing dependency and system status information after
33+
# A successful call to brew(1) bundle.
34+
export HOMEBREW_BUNDLE_NO_LOCK=1
35+
36+
# Pass the --retry 4 argument when invoking curl(1).
37+
export HOMEBREW_CURL_RETRIES=4
38+
39+
# Do not send brew(1) usage analytics to Google Analytics.
40+
export HOMEBREW_NO_ANALYTICS=1
41+
42+
# Do not automatically update before running various brew(1) subcommands.
43+
export HOMEBREW_NO_AUTO_UPDATE=1
44+
45+
# Forbid redirects from secure HTTPS to insecure HTTP.
46+
export HOMEBREW_NO_INSECURE_REDIRECT=1
47+
48+
# Never automatically cleanup installed, upgraded, and/or reinstalled formulae.
49+
export HOMEBREW_NO_INSTALL_CLEANUP=1
50+
51+
# Only list updates to installed formulae.
52+
export HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED=1
53+
54+
if ! type brew &>/dev/null; then
55+
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
56+
fi
57+
58+
# brew update uses git(1), so HOMEBREW_CURL_RETRIES does not take effect.
59+
brew update || (sleep 30; brew update)
60+
trap 'brew cleanup && rm -rf $(brew --cache)/* ${HOME}/Library/Logs/Homebrew/*'
61+
62+
# The bazelisk formula conflicts with the bazel formula because because it
63+
# attempts to replace the installed version of bazel.
64+
brew uninstall -fq bazelisk
65+
66+
brew bundle install --file="$(dirname ${(%):-%x})/Brewfile"
67+
68+
if [[ "${with_pip_install}" -eq 1 ]]; then
69+
pip3.9 install --disable-pip-version-check --no-input --retries 4 \
70+
-r "$(dirname ${(%):-%x})/requirements.txt"
71+
fi

setup/mac/requirements.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
beautifulsoup4
2+
lxml
3+
mysql-connector-python
4+
nbconvert
5+
pycodestyle
6+
pydocstyle
7+
requests
8+
yapf

setup/mac/requirements.txt

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# This file is autogenerated by pip-compile
3+
# To update, run:
4+
#
5+
# pip-compile requirements.in
6+
#
7+
async-generator==1.10
8+
# via nbclient
9+
attrs==20.3.0
10+
# via jsonschema
11+
beautifulsoup4==4.9.3
12+
# via -r requirements.in
13+
bleach==3.3.0
14+
# via nbconvert
15+
certifi==2020.12.5
16+
# via requests
17+
chardet==4.0.0
18+
# via requests
19+
defusedxml==0.6.0
20+
# via nbconvert
21+
entrypoints==0.3
22+
# via nbconvert
23+
idna==2.10
24+
# via requests
25+
ipython-genutils==0.2.0
26+
# via
27+
# nbformat
28+
# traitlets
29+
jinja2==2.11.3
30+
# via nbconvert
31+
jsonschema==3.2.0
32+
# via nbformat
33+
jupyter-client==6.1.11
34+
# via nbclient
35+
jupyter-core==4.7.1
36+
# via
37+
# jupyter-client
38+
# nbconvert
39+
# nbformat
40+
jupyterlab-pygments==0.1.2
41+
# via nbconvert
42+
lxml==4.6.2
43+
# via -r requirements.in
44+
markupsafe==1.1.1
45+
# via jinja2
46+
mistune==0.8.4
47+
# via nbconvert
48+
mysql-connector-python==8.0.23
49+
# via -r requirements.in
50+
nbclient==0.5.2
51+
# via nbconvert
52+
nbconvert==6.0.7
53+
# via -r requirements.in
54+
nbformat==5.1.2
55+
# via
56+
# nbclient
57+
# nbconvert
58+
nest-asyncio==1.5.1
59+
# via nbclient
60+
packaging==20.9
61+
# via bleach
62+
pandocfilters==1.4.3
63+
# via nbconvert
64+
protobuf==3.15.1
65+
# via mysql-connector-python
66+
pycodestyle==2.6.0
67+
# via -r requirements.in
68+
pydocstyle==5.1.1
69+
# via -r requirements.in
70+
pygments==2.8.0
71+
# via
72+
# jupyterlab-pygments
73+
# nbconvert
74+
pyparsing==2.4.7
75+
# via packaging
76+
pyrsistent==0.17.3
77+
# via jsonschema
78+
python-dateutil==2.8.1
79+
# via jupyter-client
80+
pyzmq==22.0.3
81+
# via jupyter-client
82+
requests==2.25.1
83+
# via -r requirements.in
84+
six==1.15.0
85+
# via
86+
# bleach
87+
# jsonschema
88+
# protobuf
89+
# python-dateutil
90+
snowballstemmer==2.1.0
91+
# via pydocstyle
92+
soupsieve==2.2
93+
# via beautifulsoup4
94+
testpath==0.4.4
95+
# via nbconvert
96+
tornado==6.1
97+
# via jupyter-client
98+
traitlets==5.0.5
99+
# via
100+
# jupyter-client
101+
# jupyter-core
102+
# nbclient
103+
# nbconvert
104+
# nbformat
105+
urllib3==1.26.3
106+
# via requests
107+
webencodings==0.5.1
108+
# via bleach
109+
yapf==0.30.0
110+
# via -r requirements.in
111+
112+
# The following packages are considered to be unsafe in a requirements file:
113+
# setuptools

0 commit comments

Comments
 (0)