updated ci #19
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: '*' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t sisap-baseline . | |
| - name: Run search (all tasks) | |
| run: | | |
| mkdir -p results/task-1-spot-check results/task-2-spot-check results/task-3-spot-check | |
| for task in 1 2 3; do | |
| echo "=== Task $task ===" | |
| docker run --rm \ | |
| --user "$(id -u):$(id -g)" \ | |
| --volume $(pwd)/search.py:/app/search.py:ro \ | |
| --volume $(pwd)/data:/app/data:ro \ | |
| --volume $(pwd)/results:/app/results:rw \ | |
| sisap-baseline \ | |
| python search.py \ | |
| --input data/task-$task-spot-check/*.h5 \ | |
| --task-description data/task-$task-spot-check/config.json \ | |
| --output results/task-$task-spot-check/ | |
| done | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Evaluate and plot results | |
| run: | | |
| for task in 1 2 3; do | |
| cfg=data/task-$task-spot-check/config.json | |
| dataset=$(python -c "import json; print(json.load(open('$cfg'))['dataset_name'])") | |
| echo "=== Evaluating task$task / $dataset ===" | |
| python eval.py --results results/task-$task-spot-check/ res_task${task}.csv | |
| python plot.py --task task$task --dataset $dataset res_task${task}.csv | |
| python show_operating_points.py --task task$task --dataset $dataset res_task${task}.csv | |
| done | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: Results | |
| path: | | |
| res_task*.csv | |
| result_*.png |