Skip to content

Commit

Permalink
python to read julia version
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Mar 21, 2024
1 parent 9dab09f commit 8f176b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ jobs:
restore-keys: |
${{ runner.os }}-nb-${{ env.CACHE_NUM }}-${{ hashFiles('src/**', 'Project.toml', 'Manifest.toml') }}-
- name: Read Julia version
uses: SebRollen/[email protected]
id: read_toml
with:
file: 'Manifest.toml'
field: 'julia_version'
run: echo "value=$(python getjlver.py)" >> "$GITHUB_OUTPUT"
- name: Setup Julia
uses: julia-actions/setup-julia@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions getjlver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import tomllib

with open("Manifest.toml", "rb") as f:
data = tomllib.load(f)
print(data["julia_version"])

0 comments on commit 8f176b6

Please sign in to comment.