Skip to content

Commit

Permalink
Merge pull request #2039 from AllenInstitute/bugfix/2039-update-actio…
Browse files Browse the repository at this point in the history
…ns-backport

.github/workflows: Update actions
  • Loading branch information
t-b authored Mar 11, 2024
2 parents 4d92b38 + 92b3dca commit f042655
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 43 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: [ self-hosted, Windows, Certificate ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Sign installer
run: tools/sign-installer.sh -p "${{ secrets.GHA_MIES_CERTIFICATE_PIN }}"
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: BuildInstaller-${{ matrix.kind }}-assets
Expand All @@ -72,13 +72,13 @@ jobs:
runs-on: [ self-hosted, Linux, Docker ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Code Checks
run: tools/check-code.sh
# straight from the documentation, see https://pre-commit.com/#github-actions-example
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
runs-on: [ self-hosted, Linux, Docker ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Build documentation
run: tools/documentation/run.sh
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Documentation-assets
Expand All @@ -151,7 +151,7 @@ jobs:
job_name: 🧪 Test ${{ matrix.name }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
artifact_name: test-without-hw-assets
artifact_name: TestWithoutHardware-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}

Expand All @@ -173,7 +173,7 @@ jobs:
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'NI' ]"
artifact_name: test-ni-assets
artifact_name: TestNI-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}

Expand All @@ -195,7 +195,7 @@ jobs:
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'ITC' ]"
artifact_name: test-itc18-assets
artifact_name: TestITC18-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}

Expand All @@ -217,7 +217,7 @@ jobs:
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'ITC1600' ]"
artifact_name: test-itc1600-assets
artifact_name: TestITC1600-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}

Expand All @@ -230,23 +230,23 @@ jobs:
- TestNI
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download ITC18-USB artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-itc18-assets
pattern: TestITC18-*
- name: Download ITC1600 artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-itc1600-assets
pattern: TestITC1600-*
- name: Download NI artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-ni-assets
pattern: TestNI-*
- name: Validate and read NWBv2 files
run: tools/nwb-read-tests/run.sh

Expand All @@ -265,25 +265,20 @@ jobs:
- TestITC1600
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Flatten artifact structure
run: |
find "${{ steps.download.outputs.download-path }}" -mindepth 1 -maxdepth 1 -type d |\
xargs -I {} tools/ftp-upload/flatten-files.sh "{}"
- name: Compress NWB artifacts
run: |
for dir in test-itc18-assets test-itc1600-assets test-ni-assets
do
tar --remove-files --use-compress-program=zstd -cvf $dir/NWB.tar.zst $dir/*nwb
done
working-directory: ${{ steps.download.outputs.download-path }}
run: tools/ftp-upload/compress-nwb-files.sh "${{ steps.download.outputs.download-path }}"
- name: Upload artifacts using FTP
run: |
tools/ftp-upload/upload-files.sh \
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Documentation-assets
- name: Deploy documentation to github pages
Expand All @@ -48,14 +48,14 @@ jobs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: BuildInstaller-user-assets
- name: Deploy release assets to github
Expand All @@ -69,12 +69,12 @@ jobs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- name: 📥 Download report cache from FTP
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
-d "${{ steps.gen.outputs.history }}" \
-t "cache/coverage-history"
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: report-artifacts
Expand All @@ -130,25 +130,20 @@ jobs:
- GenerateReport
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Flatten artifact structure
run: |
find "${{ steps.download.outputs.download-path }}" -mindepth 1 -maxdepth 1 -type d |\
xargs -I {} tools/ftp-upload/flatten-files.sh "{}"
- name: Compress NWB artifacts
run: |
for dir in test-itc18-assets test-itc1600-assets test-ni-assets
do
tar --remove-files --use-compress-program=zstd -cvf $dir/NWB.tar.zst $dir/*nwb
done
working-directory: ${{ steps.download.outputs.download-path }}
run: tools/ftp-upload/compress-nwb-files.sh "${{ steps.download.outputs.download-path }}"
- name: Upload artifacts using FTP
run: |
tools/ftp-upload/upload-files.sh \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-igor-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ jobs:
CI_INSTRUMENT_TESTS: ${{ inputs.instrument_tests }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
if: inputs.installer_artifact_name != ''
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
continue-on-error: false
with:
name: ${{ inputs.installer_artifact_name }}
Expand All @@ -83,7 +83,7 @@ jobs:
if: always()
run: tools/gather-logfiles-and-crashdumps.sh
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: ${{ inputs.artifact_name }}
Expand Down
16 changes: 16 additions & 0 deletions tools/ftp-upload/compress-nwb-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

cd $1

for dir in TestNI-* TestITC18-* TestITC1600-*
do
if [ ! -d $dir ]
then
continue
elif [ -n "$(find "$dir" -maxdepth 0 -type d -empty)" ]
then
continue
fi

tar --remove-files --use-compress-program=zstd -cvf $dir/NWB.tar.zst $dir/*nwb
done

0 comments on commit f042655

Please sign in to comment.