-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move PTAXSIM DB file to runner temp dir (#36)
* Move PTAXSIM db file to runner temp dir * Reformat RUNNER_TEMP context ref * Set PTAXSIM_DB_PATH explicitly * Set the DB file path, not dir path * Switch back to temp dir * Fix working dir issues * Make sure temp dir exists * Fix bash syntax * Revert to not explicitly making temp dir * Set PTAXSIM_DB_PATH in vignettes * Fix NaN values produced by 0.00 agency rates
- Loading branch information
Showing
12 changed files
with
100 additions
and
20 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 |
---|---|---|
|
@@ -8,6 +8,9 @@ inputs: | |
ASSUMED_ROLE: | ||
description: AWS role used for S3 actions | ||
outputs: | ||
PTAXSIM_DB_DIR: | ||
description: "PTAXSIM database directory on runner" | ||
value: ${{ steps.set_db_dir.outputs.PTAXSIM_DB_DIR }} | ||
PTAXSIM_VERSION: | ||
description: "PTAXSIM database version" | ||
value: ${{ steps.version_db.outputs.PTAXSIM_VERSION }} | ||
|
@@ -18,6 +21,14 @@ runs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set database directory | ||
id: set_db_dir | ||
run: | | ||
PDIR=$RUNNER_TEMP | ||
echo "PTAXSIM_DB_DIR=$PDIR" >> $GITHUB_ENV | ||
echo "PTAXSIM_DB_DIR=$PDIR" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Get database version | ||
id: version_db | ||
run: | | ||
|
@@ -30,7 +41,7 @@ runs: | |
uses: actions/[email protected] | ||
id: cache_db | ||
with: | ||
path: ptaxsim.db.bz2 | ||
path: ${{ env.PTAXSIM_DB_DIR }}/ptaxsim.db.bz2 | ||
key: ${{ format('{0}-{1}', env.PTAXSIM_VERSION, hashFiles('DESCRIPTION')) }} | ||
enableCrossOsArchive: true | ||
|
||
|
@@ -47,23 +58,27 @@ runs: | |
run: | | ||
aws s3 cp ${{ inputs.PTAXSIM_DB_BASE_URI }}/ptaxsim-${{ env.PTAXSIM_VERSION }}.db.bz2 ptaxsim.db.bz2 --quiet | ||
shell: bash | ||
working-directory: ${{ env.PTAXSIM_DB_DIR }} | ||
|
||
- name: Unpack database (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install -y pbzip2 | ||
pbzip2 -dk ${{ github.workspace }}/ptaxsim.db.bz2 | ||
pbzip2 -dk ptaxsim.db.bz2 | ||
shell: bash | ||
working-directory: ${{ env.PTAXSIM_DB_DIR }} | ||
|
||
- name: Unpack database (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install pbzip2 | ||
pbzip2 -dk ${{ github.workspace }}/ptaxsim.db.bz2 | ||
pbzip2 -dk ptaxsim.db.bz2 | ||
shell: bash | ||
working-directory: ${{ env.PTAXSIM_DB_DIR }} | ||
|
||
- name: Unpack database (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
7z x ${{ github.workspace }}\ptaxsim.db.bz2 | ||
7z x ptaxsim.db.bz2 | ||
shell: cmd | ||
working-directory: ${{ env.PTAXSIM_DB_DIR }} |
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
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
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