Skip to content

Commit

Permalink
Merge pull request #21 from tcal-x/main
Browse files Browse the repository at this point in the history
Add CI (github actions); add third_party/python/markupsafe.
  • Loading branch information
tcal-x committed Mar 11, 2021
2 parents d8b42dc + 141283e commit 56445c2
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check-doc-sw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: check-doc-sw
on: [push, pull_request]
jobs:
check-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- run: pwd && cd docs && pwd
- run: pwd && cd .. && pwd
- run: pwd && cd docs && pip3 install -r requirements.txt && make html && ls -R
check-sw:
runs-on: ubuntu-latest
steps:
- run: wget -O- https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2020.04.1-x86_64-linux-ubuntu14.tar.gz | tar -xzC /opt
- run: echo "/opt/riscv64-unknown-elf-gcc-8.3.0-2020.04.1-x86_64-linux-ubuntu14/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- run: bash scripts/setup -ci
- run: which pip3 && which python3 && which pip
- run: riscv64-unknown-elf-gcc --version
- run: pwd && source environment && cd proj/mnv2_first && pip3 list && make -j9 software
9 changes: 9 additions & 0 deletions .github/workflows/manual-wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: manual-wf
on: [workflow_dispatch]
jobs:
ls-recursive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: ls -R
- run: echo Hi There
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@
[submodule "third_party/python/jinja"]
path = third_party/python/jinja
url = https://github.com/pallets/jinja.git
[submodule "third_party/python/markupsafe"]
path = third_party/python/markupsafe
url = https://github.com/pallets/markupsafe.git
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Sphinx==3.3.0
sphinx-material==0.0.32
sphinx-tabs==1.3.0
sphinx-jinja==1.1.1
recommonmark==0.7.1
19 changes: 15 additions & 4 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,24 @@ if ! which verilator >/dev/null; then
missing+=(verilator libevent-dev libjson-c-dev)
fi

in_ci=0
if [ $# -gt 0 ] ; then
if [ $1 == "-ci" ] ; then
in_ci=1
fi
fi

if [ ${#missing[@]} -gt 0 ]; then
echo "Missing packages: ${missing[@]}" >&2
if which apt >/dev/null; then
echo -n "Install [y]/n? " >&2
answer=$(read)
if [ "$answer" == "y" -o -z "$answer" ]; then
sudo apt install "${missing[@]}"
if [ $in_ci -gt 0 ]; then
sudo apt install -y "${missing[@]}"
else
echo -n "Install [y]/n? " >&2
answer=$(read)
if [ "$answer" == "y" -o -z "$answer" ]; then
sudo apt install "${missing[@]}"
fi
fi
else
exit 1
Expand Down
1 change: 1 addition & 0 deletions third_party/python/markupsafe
Submodule markupsafe added at e8af94

0 comments on commit 56445c2

Please sign in to comment.