forked from bluecheetah/pybag
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from boblinchuan/without_OA
Merging without_OA and develop branches
- Loading branch information
Showing
22 changed files
with
725 additions
and
599 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,97 @@ | ||
# Testing if we can install Conda successfully. Sanity checking the CI flow. | ||
name: conda-test | ||
|
||
on: [push] | ||
|
||
env: | ||
CONDA_ENV_NAME: conda_test | ||
|
||
jobs: | ||
conda-cache: | ||
runs-on: ubuntu-20.04 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
continue-on-error: true | ||
outputs: | ||
pytestOutput: ${{ steps.unit-tests.outputs.test }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Setup conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
activate-environment: ${{ env.CONDA_ENV_NAME }} | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Save Conda Env | ||
# Workaround, this isn't working otherwise. | ||
run: | | ||
echo "CONDA=$CONDA" | ||
echo "CONDA=$CONDA" >> "$GITHUB_ENV" | ||
- name: Cache Conda env | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} | ||
key: | ||
conda-test-conda-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
hashFiles('conda_test.yml') }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
CACHE_NUMBER: 0 | ||
id: cache | ||
- name: Update environment | ||
run: | | ||
echo "CONDA=$CONDA" | ||
conda env update -n ${{ env.CONDA_ENV_NAME }} -f conda_test.yml | ||
ls $CONDA/envs/ | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
conda-cache-load: | ||
needs: conda-cache | ||
runs-on: ubuntu-20.04 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
continue-on-error: true | ||
outputs: | ||
pytestOutput: ${{ steps.unit-tests.outputs.test }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Setup conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
activate-environment: ${{ env.CONDA_ENV_NAME }} | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Save Conda Env | ||
# Workaround, this isn't working otherwise. | ||
run: | | ||
echo "CONDA=$CONDA" | ||
echo "CONDA=$CONDA" >> "$GITHUB_ENV" | ||
- name: Cache Conda env | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} | ||
key: | ||
conda-test-conda-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
hashFiles('conda_test.yml') }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
CACHE_NUMBER: 0 | ||
id: cache | ||
- name: Fail | ||
run: exit 1 | ||
if: steps.cache.outputs.cache-hit != 'true' |
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,157 @@ | ||
# CI flow | ||
name: pybag-pr-ci | ||
|
||
on: | ||
push: | ||
schedule: | ||
- cron: '0 9 * * *' # 9AM UTC = 2AM PST | ||
|
||
env: | ||
CONDA_ENV_NAME: bag_py3d7_c | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
continue-on-error: true | ||
outputs: | ||
pytestOutput: ${{ steps.unit-tests.outputs.test }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7"] | ||
steps: | ||
- name: Install packages | ||
run: | | ||
sudo apt update | ||
sudo apt -y install \ | ||
autoconf \ | ||
curl \ | ||
gcc-8 \ | ||
g++-8 \ | ||
git \ | ||
libtool \ | ||
libltdl-dev \ | ||
pkg-config \ | ||
make \ | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
activate-environment: ${{ env.CONDA_ENV_NAME }} | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Save Conda Env | ||
# Workaround, this isn't working otherwise. | ||
run: | | ||
echo "CONDA=$CONDA" | ||
echo "CONDA=$CONDA" >> "$GITHUB_ENV" | ||
- name: Cache Conda env | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} | ||
key: | ||
conda-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
hashFiles('environment.yml') }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if etc/example-environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache-conda | ||
- name: Update conda environment | ||
run: | | ||
echo "CONDA=$CONDA" | ||
conda env update -n ${{ env.CONDA_ENV_NAME }} -f environment.yml | ||
if: steps.cache-conda.outputs.cache-hit != 'true' | ||
- name: Install additional dependencies | ||
if: steps.cache-conda.outputs.cache-hit != 'true' | ||
run: | | ||
cd setup | ||
mkdir install | ||
cp setup_script.sh install/ | ||
cp render_template.py install/ | ||
cp project-config.template install/ | ||
cd install | ||
./setup_script.sh | ||
cd ../../ | ||
- name: Build cbag and pybag | ||
id: cpp-build | ||
run: | | ||
export PYBAG_PYTHON=python | ||
echo "PYBAG_PYTHON=$PYBAG_PYTHON" | ||
./run_test.sh | ||
- name: Cache pybag build | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: | ||
build-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if etc/example-environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache-pybag | ||
test: | ||
needs: build | ||
runs-on: ubuntu-20.04 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
continue-on-error: true | ||
outputs: | ||
pytestOutput: ${{ steps.unit-tests.outputs.test }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup conda | ||
uses: conda-incubator/[email protected] | ||
with: | ||
activate-environment: bag_py3d7_c | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Save Conda Env | ||
# Workaround, this isn't working otherwise. | ||
run: | | ||
echo "CONDA=$CONDA" | ||
echo "CONDA=$CONDA" >> "$GITHUB_ENV" | ||
- name: Cache Conda env | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CONDA }}/envs/${{ env.CONDA_ENV_NAME }} | ||
key: | ||
conda-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
hashFiles('environment.yml') }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if etc/example-environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache-conda | ||
- name: Cache pybag build | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build | ||
key: | ||
build-${{ runner.os }}--${{ runner.arch }}--${{ | ||
steps.get-date.outputs.today }}-${{ | ||
env.CACHE_NUMBER }} | ||
env: | ||
# Increase this value to reset cache if etc/example-environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
id: cache-pybag | ||
- name: Run test | ||
id: run-pytest | ||
run: | | ||
which pytest | ||
pytest tests -v |
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 |
---|---|---|
|
@@ -15,3 +15,4 @@ __pycache__ | |
# build related files | ||
_build | ||
.pytest_cache | ||
src/pybag/core.pyi |
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
Submodule cbag
updated
15 files
+1 −0 | CMakeLists.txt | |
+2 −0 | include/cbag/enum/design_output.h | |
+1 −1 | include/cbag/netlist/core.h | |
+3 −0 | include/cbag/netlist/lstream.h | |
+7 −0 | include/cbag/netlist/netlist.h | |
+96 −0 | include/cbag/netlist/ngspice.h | |
+2 −0 | include/cbag/spirit/ast.h | |
+1 −0 | include/cbag/spirit/namespace_info.h | |
+2 −2 | src/cbag/netlist/cdl.cpp | |
+5 −0 | src/cbag/netlist/lstream.cpp | |
+6 −0 | src/cbag/netlist/netlist.cpp | |
+402 −0 | src/cbag/netlist/ngspice.cpp | |
+4 −1 | src/cbag/netlist/spectre.cpp | |
+2 −2 | src/cbag/netlist/verilog.cpp | |
+46 −0 | src/cbag/spirit/ast.cpp |
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,8 @@ | ||
name: conda_test | ||
channels: | ||
- anaconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- numpy-base>=1.21.5 | ||
|
Oops, something went wrong.