-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
596 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# SPDX-FileCopyrightText: 2023 Everybody | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
name: Scala CI | ||
|
||
on: [push, pull_request] #push, pull_request | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Install packages | ||
run: source .github/workflows/tools.sh && install_packages | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-v2 | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Cache SBT | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.ivy2/cache | ||
~/.sbt | ||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }} | ||
|
||
- name: Cache tools | ||
id: tools | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/tools | ||
key: ${{ runner.os }}-tools_v7 | ||
|
||
- name: Setup env | ||
run: echo "$HOME/tools/bin" >> $GITHUB_PATH | ||
|
||
- name: Install cached tools | ||
if: steps.tools.outputs.cache-hit != 'true' | ||
run: source .github/workflows/tools.sh && install_cached | ||
|
||
- name: Install uncached tools | ||
run: source .github/workflows/tools.sh && install_uncached | ||
|
||
- name: Compile | ||
run: sbt clean compile | ||
|
||
# - name: Test | ||
# run: NAXRISCV_REGRESSION_THREAD_COUNT=1 SBT_OPTS="-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2G -Xss2M -Duser.timezone=GMT" sbt test |
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,72 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-FileCopyrightText: 2023 "Everybody" | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
install_verilator(){ | ||
sudo apt-get update | ||
sudo apt install -y git make autoconf g++ flex libfl-dev bison # First time prerequisites | ||
git clone http://git.veripool.org/git/verilator # Only first time | ||
unset VERILATOR_ROOT # For bash | ||
cd verilator | ||
git pull # Make sure we're up-to-date | ||
git checkout v4.216 | ||
autoconf # Create ./configure script | ||
./configure --prefix ~/tools | ||
make -j$(nproc) | ||
make install | ||
cd .. | ||
} | ||
|
||
|
||
|
||
install_NaxSoftware(){ | ||
(cd $VEXIIRISCV/ext/NaxSoftware && ./init.sh) | ||
} | ||
|
||
install_spike(){ | ||
cd $VEXIIRISCV/ext/riscv-isa-sim | ||
mkdir build | ||
cd build | ||
../configure --prefix=$RISCV --enable-commitlog --without-boost --without-boost-asio --without-boost-regex | ||
make -j$(nproc) | ||
} | ||
|
||
|
||
install_rvls(){ | ||
cd $VEXIIRISCV/ext/rvls | ||
make -j$(nproc) | ||
cp -f build/apps/rvls.so ~/tools/rvls.so | ||
} | ||
|
||
|
||
install_elfio(){ | ||
git clone https://github.com/serge1/ELFIO.git | ||
cd ELFIO | ||
git checkout d251da09a07dff40af0b63b8f6c8ae71d2d1938d # Avoid C++17 | ||
sudo cp -R elfio /usr/include | ||
cd .. | ||
} | ||
|
||
install_packages(){ | ||
sudo apt-get update | ||
sudo apt install -y zlib1g-dev libboost-all-dev libboost-dev libasio-dev device-tree-compiler libsdl2-2.0-0 libsdl2-dev | ||
install_elfio | ||
} | ||
|
||
install_uncached(){ | ||
export VEXIIRISCV=${PWD} | ||
install_NaxSoftware | ||
|
||
mkdir -p $VEXIIRISCV/ext/rvls/build/apps | ||
cp -f ~/tools/rvls.so $VEXIIRISCV/ext/rvls/build/apps/rvls.so | ||
} | ||
|
||
install_cached(){ | ||
export VEXIIRISCV=${PWD} | ||
mkdir -p ~/tools | ||
(install_spike) | ||
(install_rvls) | ||
(install_verilator) | ||
} |
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
Submodule NaxSoftware
updated
7 files
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
Oops, something went wrong.