mirror of
https://github.com/PlaneQuery/OpenAirframes.git
synced 2026-07-30 13:28:49 +02:00
use cache from github workflows
This commit is contained in:
@@ -44,8 +44,25 @@ jobs:
|
|||||||
print(f"::set-output name=matrix::{json.dumps(ranges)}")
|
print(f"::set-output name=matrix::{json.dumps(ranges)}")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
clone-faa-repo:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Cache FAA repository
|
||||||
|
id: cache-faa-repo
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: data/scrape-faa-releasable-aircraft
|
||||||
|
key: faa-repo-v1
|
||||||
|
|
||||||
|
- name: Clone FAA repository
|
||||||
|
if: steps.cache-faa-repo.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
mkdir -p data
|
||||||
|
git clone https://github.com/simonw/scrape-faa-releasable-aircraft data/scrape-faa-releasable-aircraft
|
||||||
|
echo "Repository cloned successfully"
|
||||||
|
|
||||||
process-chunk:
|
process-chunk:
|
||||||
needs: generate-matrix
|
needs: [generate-matrix, clone-faa-repo]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
max-parallel: 5 # Process 5 chunks at a time
|
max-parallel: 5 # Process 5 chunks at a time
|
||||||
@@ -60,14 +77,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Cache FAA repository
|
- name: Restore FAA repository cache
|
||||||
id: cache-faa-repo
|
uses: actions/cache/restore@v4
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: data/scrape-faa-releasable-aircraft
|
path: data/scrape-faa-releasable-aircraft
|
||||||
key: faa-repo-v1
|
key: faa-repo-v1
|
||||||
restore-keys: |
|
fail-on-cache-miss: true
|
||||||
faa-repo-v1
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -24,17 +24,6 @@ args = parser.parse_args()
|
|||||||
|
|
||||||
# Clone repository if it doesn't exist
|
# Clone repository if it doesn't exist
|
||||||
REPO = Path("data/scrape-faa-releasable-aircraft")
|
REPO = Path("data/scrape-faa-releasable-aircraft")
|
||||||
if not REPO.exists():
|
|
||||||
print(f"Cloning repository to {REPO}...")
|
|
||||||
subprocess.run([
|
|
||||||
"git", "clone",
|
|
||||||
"https://github.com/simonw/scrape-faa-releasable-aircraft",
|
|
||||||
str(REPO)
|
|
||||||
], check=True)
|
|
||||||
print("Repository cloned successfully.")
|
|
||||||
else:
|
|
||||||
print(f"Repository already exists at {REPO}")
|
|
||||||
|
|
||||||
OUT_ROOT = Path("data/faa_releasable_historical")
|
OUT_ROOT = Path("data/faa_releasable_historical")
|
||||||
OUT_ROOT.mkdir(parents=True, exist_ok=True)
|
OUT_ROOT.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user