fixup #98
Workflow file for this run
This file contains hidden or 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: Generate Databases | |
| on: | |
| push: | |
| branches: ["main", "tmp"] | |
| tags: ["v*.*"] | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| run-generate-database: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| species: [Sr87, Sr88, Yb171, Yb173, Yb174] | |
| include: | |
| - extra_args: "--n-max 220" # test | |
| # FIXME: the following species do not yet support high \ell states | |
| - species: Sr87 | |
| extra_args: "--n-max 220 --skip-high-l" | |
| - species: Yb171 | |
| extra_args: "--n-max 220 --skip-high-l" | |
| - species: Yb173 | |
| extra_args: "--n-max 130 --skip-high-l" # FIXME: Yb173 fails for n > 130 | |
| name: ${{ matrix.species }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 300 | |
| permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created | |
| actions: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/checkout@v5 | |
| name: Clone MQDT.jl | |
| with: | |
| repository: pairinteraction/MQDT.jl | |
| path: MQDT.jl | |
| ref: ad688203efd335925b413799e9b2d98d8d7b864d | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: 1.11 | |
| arch: x64 | |
| - uses: julia-actions/cache@v2 | |
| - name: Instantiate julia environment | |
| run: julia --project=. -e 'import Pkg; Pkg.develop(path="MQDT.jl"); Pkg.instantiate()' | |
| - name: Run generate_database | |
| run: julia --project=. generate_database.jl ${{ matrix.species }} --directory database ${{ matrix.extra_args }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: database-${{ matrix.species }} | |
| path: | | |
| database/*/*.parquet | |
| github-release: | |
| name: Release database files to github releases | |
| if: startsWith(github.ref, 'refs/tags/') # only release to github on tag pushes | |
| needs: [run-generate-database] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all the database files | |
| uses: actions/download-artifact@v5 | |
| with: | |
| path: database | |
| pattern: database-* | |
| merge-multiple: true | |
| - name: Zip database folders | |
| working-directory: database/ | |
| run: | | |
| VERSION_TAG=${GITHUB_REF#refs/tags/} | |
| for dir in */; do | |
| if [[ "$dir" != *"$VERSION_TAG/" ]]; then | |
| echo "Error: Version mismatch between folder $dir and version tag $VERSION_TAG" | |
| exit 1 | |
| fi | |
| zip -r "${dir%/}.zip" "$dir" | |
| done | |
| - name: Release zipped database folders | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: database/*.zip | |
| draft: true |