Skip to content

Commit

Permalink
Merge branch 'update-or-latest' into cell-count-metric
Browse files Browse the repository at this point in the history
Signed-off-by: Kareem Farid <kareefardi@users.noreply.github.com>
  • Loading branch information
kareefardi committed Sep 23, 2024
2 parents 650e07a + f43bf1f commit d2b329f
Show file tree
Hide file tree
Showing 88 changed files with 1,933 additions and 626 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:
You also need to upload some files so we can reproduce your issue.
If a step fails, you can create a reproducible by going
into the step directory, then typing `openlane.steps create-reproducible -d .`
into the step directory, then typing `openlane.steps create-reproducible`
A new directory called `reproducible` should be created. Zip or tarball
that directory then upload by clicking and dragging the file to
Expand Down
41 changes: 12 additions & 29 deletions .github/actions/build_nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,74 +17,57 @@ inputs:
description: "The nix platform string to build for"
required: true
default: "x86_64-linux"
local_cache_key:
description: Key to use for the cache
required: false
default: ""
run_tests:
description: Whether to run unit tests and the smoke test
required: false
default: "false"
pdk_root:
description: "An optional override for the PDK root."
required: false
default: "$HOME/.volare"
runs:
using: "composite"
steps:
- id: cache
name: Cache Derivation
uses: actions/cache@v3
with:
key: ${{ inputs.local_cache_key }}-${{ inputs.nix_system }}
path: /tmp/${{ inputs.local_cache_key }}
- id: Build
name: Build
shell: ${{ inputs.shell }}
run: |
substituters='https://${{ inputs.cachix_cache }}.cachix.org https://cache.nixos.org'
if [ '${{ inputs.local_cache_key }}' = '' ]; then
substituters="file:///tmp/${{ inputs.local_cache_key }} $substituters"
fi
echo "#################################################################"
outPath=$(nix build\
--print-out-paths\
--no-link\
--accept-flake-config\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--option substituters "$substituters"\
.#devShells.${{ inputs.nix_system }}.default)
echo "out-path=$outPath" >> $GITHUB_OUTPUT
sudo du -hs /nix/store/* | sort -h | tail -n 20
- name: Unit/Step Tests
- name: Smoke Test
shell: ${{ inputs.shell }}
if: inputs.run_tests == 'true'
run: |
echo "#################################################################"
nix develop\
nix run\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--accept-flake-config\
.#devShells.${{ inputs.nix_system }}.dev --command pytest --step-rx '.' -n auto
- name: Smoke Test
.#packages.${{ inputs.nix_system }}.openlane -- --pdk-root ${{ inputs.pdk_root }} --smoke-test
- name: Unit/Step Tests
shell: ${{ inputs.shell }}
if: inputs.run_tests == 'true'
run: |
echo "#################################################################"
nix run\
nix develop\
--option system ${{ inputs.nix_system }}\
--extra-platforms ${{ inputs.nix_system }}\
--accept-flake-config\
.#packages.${{ inputs.nix_system }}.openlane -- --smoke-test
- name: Push to local cache
shell: ${{ inputs.shell }}
if: inputs.local_cache_key != '' && steps.cache.outputs.cache-hit != 'true'
run: |
nix copy\
--to 'file:///tmp/${{ inputs.local_cache_key }}?compression=zstd&parallel-compression=true'\
${{ steps.build.outputs.out-path }}
.#devShells.${{ inputs.nix_system }}.dev --command\
pytest --step-rx '.' --pdk-root="${{ inputs.pdk_root }}" -n auto
- name: Install + Push to Cachix
shell: ${{ inputs.shell }}
if: ${{ inputs.cachix_token != '' }}
run: |
echo "#################################################################"
nix-env -iA cachix -f https://cachix.org/api/v1/install
nix profile install cachix
cachix authtoken ${{ inputs.cachix_token }}
cachix push ${{ inputs.cachix_cache }} ${{ steps.build.outputs.out-path }}
11 changes: 9 additions & 2 deletions .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ runs:
shell: bash
run: echo "NEW_TAG=NO_NEW_TAG" >> $GITHUB_ENV

- name: Check if publishing branch
shell: bash
run: |
if [[ "$BRANCH_NAME" == "main" || "$BRANCH_NAME" == version* ]]; then
echo "PUBLISHING_BRANCH=1" >> $GITHUB_ENV
fi
- name: Check for new version
if: ${{ github.event_name == 'push' && env.BRANCH_NAME == 'main' }}
if: ${{ github.event_name == 'push' && env.PUBLISHING_BRANCH == '1' }}
shell: bash
run: |
python3 ./.github/scripts/generate_tag.py
- name: Publish
if: ${{ github.event_name == 'push' && env.BRANCH_NAME == 'main' && env.NEW_TAG != 'NO_NEW_TAG' }}
if: ${{ github.event_name == 'push' && env.PUBLISHING_BRANCH == '1' && env.NEW_TAG != 'NO_NEW_TAG' }}
shell: bash
run: |
echo "PUBLISH=1" >> $GITHUB_ENV
Loading

0 comments on commit d2b329f

Please sign in to comment.