Skip to content

Commit

Permalink
Merge branch 'main' into plateau-neuron
Browse files Browse the repository at this point in the history
  • Loading branch information
mgkwill authored Aug 8, 2024
2 parents 0c6bf24 + efbe872 commit d2aed48
Show file tree
Hide file tree
Showing 81 changed files with 7,862 additions and 1,876 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run CD
permissions: read-all
on:
workflow_dispatch:

Expand Down Expand Up @@ -134,11 +135,12 @@ jobs:
name: Upload release artifact
runs-on: ubuntu-latest
if: github.triggering_actor == 'mgkwill' || github.triggering_actor == 'PhilippPlank' || github.triggering_actor == 'tim-shea'
outputs:
api-token: ${{ steps.mint-token.outputs.api-token}}
environment:
name: pypi
url: https://pypi.org/p/lava-nc/
permissions:
contents: write
id-token: write
contents: write
needs: [build-artifacts, test-artifact-install, test-artifact-use]

steps:
Expand Down Expand Up @@ -184,27 +186,12 @@ jobs:
generateReleaseNotes: true
makeLatest: true

- name: Mint Github API token
id: mint-token
run: |
# retrieve OIDC token
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi")
oidc_token=$(jq '.value' <<< "${resp}")
# exchange OIDC token for API token
resp=$(curl -X POST https://pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}")
api_token=$(jq '.token' <<< "${resp}")
# mask the API token, to prevent leaking it
echo "::add-mask::${api_token}"
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
- name: Publish to PyPI
if: steps.check-version.outputs.prerelease != 'true'
run: |
poetry config pypi-token.pypi ${{ steps.mint-token.outputs.api-token }}
mkdir dist
cp lava* dist/.
poetry publish
- name: Publish package distributions to PyPI
if: steps.check-version.outputs.prerelease != 'true'
uses: pypa/gh-action-pypi-publish@release/v1
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run CI
permissions: read-all
on:
push:
branches:
Expand All @@ -20,7 +21,7 @@ jobs:
lfs: true

- name: setup CI
uses: lava-nc/ci-setup-composite-action@v1.2
uses: lava-nc/ci-setup-composite-action@v1.5.10_py3.10
with:
repository: 'Lava'

Expand All @@ -38,7 +39,7 @@ jobs:
lfs: true

- name: setup CI
uses: lava-nc/ci-setup-composite-action@v1.2
uses: lava-nc/ci-setup-composite-action@v1.5.10_py3.10
with:
repository: 'Lava'

Expand All @@ -54,14 +55,14 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
operating-system: [ubuntu-latest, windows-latest, macos-13]
steps:
- uses: actions/checkout@v3
with:
lfs: true

- name: setup CI
uses: lava-nc/ci-setup-composite-action@v1.2
uses: lava-nc/ci-setup-composite-action@v1.5.10_py3.10
with:
repository: 'Lava'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codacy_coverage_reporter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Codacy Coverage Reporter

permissions: read-all
on:
workflow_run:
workflows: ["Run CI"]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Add new issues to the NCL planning project and label them

permissions: {}
on:
issues:
types:
Expand All @@ -10,6 +10,7 @@ on:
jobs:
add-to-project:
name: Add issue to project
permissions: {}
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,5 @@ dmypy.json
.idea/
.vscode/
.history/
.flakeheaven_cache/
tutorials/in_depth/results/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "docs"]
path = docs
url = https://github.com/lava-nc/lava-docs.git
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cd $HOME
curl -sSL https://install.python-poetry.org | python3 -
git clone [email protected]:lava-nc/lava.git
cd lava
git checkout v0.8.0
git checkout v0.9.0
./utils/githook/install-hook.sh
poetry config virtualenvs.in-project true
poetry install
Expand All @@ -90,7 +90,7 @@ pytest
cd $HOME
git clone [email protected]:lava-nc/lava.git
cd lava
git checkout v0.8.0
git checkout v0.9.0
python3 -m venv .venv
.venv\Scripts\activate
pip install -U pip
Expand Down Expand Up @@ -186,7 +186,7 @@ python -m venv .venv
source .venv/bin/activate ## Or Windows: .venv\Scripts\activate
pip install -U pip
# Substitute lava version needed for lava-nc-<version here>.tar.gz below
pip install lava-nc-0.8.0.tar.gz
pip install lava-nc-0.9.0.tar.gz
```

## Linting, testing, documentation and packaging
Expand Down
1 change: 0 additions & 1 deletion docs
Submodule docs deleted from 9492b5
Loading

0 comments on commit d2aed48

Please sign in to comment.