Skip to content

5.1.0

5.1.0 #157

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Use OCaml 5.0.0+custom-events
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ocaml-variants.5.0.0+custom-events
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
custom-events: https://github.com/TheLortex/custom-events-opam-repository.git
dune-cache: true
- name: Meio Deps 🐈‍⬛
run: | # notty is pinned to hardcode the tty size (160 * 40)
opam pin -yn git+https://github.com/TheLortex/notty.git#override-lines-cols
opam install . --deps-only --with-test
- name: Build
run: opam exec -- dune build
- name: Update asciicast dependencies
run: |
go install github.com/TheLortex/asciiscript@latest
sudo apt install asciinema fonts-firacode
- name: Run asciicast and convert to GIF
run: |
export PATH=${PATH}:`go env GOPATH`/bin
export TERM=xterm-256color
sudo sed -i 's/return os\.get_terminal_size()/return (160, 40)/' /usr/lib/python3/dist-packages/asciinema/term.py
asciiscript .screencast/example.sh .screencast/example.cast --overwrite
wget https://github.com/asciinema/agg/releases/download/v1.4.1/agg-x86_64-unknown-linux-gnu -O agg
echo "3c933591d396d22355a37ff40b4259c8b1e2de8f896cf8c7dec1fab72e5f527e agg" | sha256sum --check
chmod +x agg
./agg .screencast/example.cast .screencast/example.gif --font-family "Fira Code" --font-size=18
- uses: actions/upload-artifact@v3
with:
name: asciicast
path: |
.screencast/example.cast
.screencast/example.gif
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
if: ${{ github.event_name == 'push' }}
with:
add-paths: .screencast/example.gif
commit-message: Update screencast
title: Update screencast
body: |
_Generated by [create-pull-request](https://github.com/peter-evans/create-pull-request) Github action_
labels: ci