fix: simulation test #27
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
name: Build test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodule: true | |
- name: Install Gurobi | |
run: | | |
cd /opt | |
export GRB_VERSION=9.1.1 | |
export GRB_SHORT_VERSION=9.1 | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
ca-certificates \ | |
wget | |
sudo update-ca-certificates | |
wget -v https://packages.gurobi.com/${GRB_SHORT_VERSION}/gurobi_server${GRB_VERSION}_linux64.tar.gz | |
tar -xvf gurobi_server${GRB_VERSION}_linux64.tar.gz | |
rm -f gurobi_server${GRB_VERSION}_linux64.tar.gz | |
mv -f gurobi_server* gurobi_server | |
rm -rf gurobi/linux64/docs | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
p7zip-full \ | |
zip | |
sudo update-ca-certificates | |
export GRB_HOME=/opt/gurobi_server/linux64 | |
export PATH="${PATH}:${GRB_HOME}/bin" | |
- name: Gurobi License setting | |
run: | | |
sudo echo WLSACCESSID=${{ secrets.WLSACCESSID }} >> /opt/gurobi/gurobi.lic | |
sudo echo WLSSECRET=${{ secrets.WLSSECRET }} >> /opt/gurobi/gurobi.lic | |
sudo echo LICENSEID=${{ secrets.LICENSEID }} >> /opt/gurobi/gurobi.lic | |
- name: Install dependencies | |
run: | | |
sudo wget -qO- "https://cmake.org/files/v3.20/cmake-3.20.2-linux-x86_64.tar.gz" | sudo tar --strip-components=1 -xz -C /usr/local | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
clang \ | |
clang-format \ | |
vim \ | |
git \ | |
ninja-build \ | |
gdb \ | |
python3-pip \ | |
verilator | |
export PATH="/home/verilator/bin:${PATH}" | |
export GRB_LICENSE_FILE="/opt/gurobi/gurobi.lic" | |
- name: Build | |
run: | | |
cmake -S . -B build -GNinja | |
cmake --build build -j4 | |
- name: Test | |
run: | | |
cd build && ctest -V | |