demonstrate SVM smoothing sin #158
This file contains 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
# https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action | |
# cf. https://github.com/sandrokeil/docker-files/tree/master/gource | |
# cf. https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
name: gource | |
on: | |
push: | |
branches: [main] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
# cf. https://github.com/actions/virtual-environments/issues/228#issuecomment-637362224 | |
runs-on: ubuntu-20.04 | |
name: gource | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install nodejs | |
# https://github.com/nodesource/distributions/blob/master/README.md#debinstall | |
# NB: also runs the `apt update` for us | |
run: (curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -) && sudo apt install -y nodejs && node -e 'console.log ("ok")' | |
- name: install gource xvfb ffmpeg | |
run: sudo apt install -y gource xvfb ffmpeg | |
- name: install gifski | |
run: sudo snap install gifski | |
- name: gource to ffmpeg | |
run: xvfb-run --server-num=99 gource -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4 | |
- name: mp4 to frames | |
run: mkdir frames && ffmpeg -i ./gource.mp4 -r 5 frames/%04d.png | |
- name: frames to gif | |
run: gifski -o gource.gif ./frames/*.png && rm -rf ./frames | |
- name: list files | |
run: sudo find . | |
# Shows how to push the generated GIF into the repository | |
# We don't want to do this here, per | |
# https://homes.cs.washington.edu/~mernst/advice/version-control.html#Dont_commit_generated_files | |
# but might still be useful if there is no better option | |
#- name: Setup git | |
# uses: mikeal/publish-to-github-action@master | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# BRANCH_NAME: 'main' #optional defaults to master |