Skip to content

Commit

Permalink
actions: source reference cores from gDrive
Browse files Browse the repository at this point in the history
  • Loading branch information
sdimitro committed Dec 9, 2024
1 parent 5b5e5f1 commit 1ef78b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/scripts/download-dumps-from-gdrive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -eux

#
# Download all the reference core dumps from the public gDrive folder
# and place them in the root directory.
#
pip install gdown
gdown --folder 1fdPVuGXbxNKcMEVwhuda04hZTPCcYJms
mv SDB-Public/* .
rmdir SDB-Public
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Assumptions for this to work:
# [1] This script is executed from the root of the SDB repo
# [2] The archive downloaded from S3 has one of the following profiles:
# [2] The archive downloaded from gdrive has one of the following profiles:
# Profile A - It is lzma-compressed and has the following file structure:
# dump-data
# ├── dump.201912060006
Expand Down Expand Up @@ -33,12 +33,8 @@ if [ ! -d $DATA_DIR ]; then
exit 1
fi

if [ -f "$1" ]; then
echo "Found $1 locally, skip download ..."
else
echo "downloading of $1 from S3 ..."
wget https://sdb-testing-bucket.s3.us-west-2.amazonaws.com/$1
[ $? -eq 0 ] || exit 1
if [ ! -f "$1" ]; then
echo "error: $1: file not found"
fi

if [[ $1 == *.tar.lzma ]]; then
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
strategy:
matrix:
python-version: [3.8, 3.9]
dump: [dump.201912060006.tar.lzma, dump.202303131823.tar.gz]
env:
AWS_DEFAULT_REGION: 'us-west-2'
steps:
Expand All @@ -67,7 +66,9 @@ jobs:
- run: python3 -m pip install aws python-config pytest pytest-cov
- run: ./.github/scripts/install-libkdumpfile.sh
- run: ./.github/scripts/install-drgn.sh
- run: ./.github/scripts/download-dump-from-s3.sh ${{ matrix.dump }}
- run: ./.github/scripts/download-dumps-from-gdrive.sh
- run: ./.github/scripts/extract-dump.sh dump.201912060006.tar.lzma
- run: ./.github/scripts/extract-dump.sh dump.202303131823.tar.gz
- run: pytest -v --cov sdb --cov-report xml tests
- uses: codecov/codecov-action@v1
with:
Expand Down

0 comments on commit 1ef78b3

Please sign in to comment.