Skip to content

Add Koniakow Kadluby dataset #39

Add Koniakow Kadluby dataset

Add Koniakow Kadluby dataset #39

name: Versioning and release
on:
pull_request_target:
branches:
- main
types:
- closed
paths:
- '**.laz'
- '**.las'
- '**.ply'
jobs:
check_skip:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
outputs:
should_continue: ${{ steps.check_skip.outputs.should_continue }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y --fix-missing --no-install-recommends \
curl \
jq \
- name: Check for !skip comment
id: check_skip
run: |
chmod +x evaluation/check_skip.sh
./evaluation/check_skip.sh ${{ github.event.pull_request.number }} ${{ github.repository }} Semantic3D ${{ secrets.GROUND_TRUTH_REPO_TOKEN }}
echo "should_continue=true" >> $GITHUB_OUTPUT
versioning:
needs: check_skip
if: needs.check_skip.outputs.should_continue == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git config core.fileMode false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install bump2version
run: |
python -m pip install --upgrade pip
pip install bump2version
- name: Fetch changed files and update JSON file
run: |
echo "Fetching changed files"
CHANGED_FILES=$(git diff --name-only --diff-filter=AMR ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} -- '*.laz' '*.las' '*.ply')
python evaluation/update_json.py evaluation/settings.json $CHANGED_FILES
- name: Commit and push settings.json changes
run: |
git add evaluation/settings.json
git commit -m "Update JSON file"
git push origin main
- name: Bump version
id: bump_version
run: |
OLD_VERSION=$(cat VERSION)
bump2version --commit --tag patch
NEW_VERSION=$(cat VERSION)
echo "Old version: $OLD_VERSION"
echo "New version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GROUND_TRUTH_REPO_TOKEN }}
tags: true
release:
needs: [check_skip, versioning]
runs-on: ubuntu-latest
if: needs.check_skip.outputs.should_continue == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout ground truth repository
uses: actions/checkout@v2
with:
repository: ${{ secrets.GROUND_TRUTH_REPO }}
token: ${{ secrets.GROUND_TRUTH_REPO_TOKEN }}
path: ground-truth
- name: Download new model and stats files
run: |
chmod +x evaluation/download_artifact.sh
./evaluation/download_artifact.sh ${{ github.repository }} evaluation.yml model ${{ secrets.GROUND_TRUTH_REPO_TOKEN }}
./evaluation/download_artifact.sh ${{ github.repository }} evaluation.yml new-stats ${{ secrets.GROUND_TRUTH_REPO_TOKEN }}
- name: Display structure of downloaded files
run: ls -R
- name: Unzip stats archive and replace old stats file
run: |
unzip new-stats.zip
find ground-truth -type f -iname "new-stats.json" -exec bash -c 'mv $0 ${0/new-/}' {} \;
- name: Replace and push new stats files
run: |
cd ground-truth
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add .
git commit -m "Statistics update"
git push origin main
- name: Get latest tag and save it to env variable
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.LATEST_TAG }}
tag_name: ${{ env.LATEST_TAG }}
draft: false
prerelease: false
body: |
New model trained on ${{ github.repository }}
files: |
model.bin