File: js.yml

package info (click to toggle)
liquidsoap 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,844 kB
  • sloc: ml: 74,136; javascript: 27,320; ansic: 505; sh: 139; xml: 114; lisp: 96; makefile: 26
file content (50 lines) | stat: -rw-r--r-- 1,670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: JS Build

on:
  workflow_call:
    inputs:
      sha:
        required: true
        type: string
      branch:
        required: true
        type: string

jobs:
  build_js:
    runs-on: depot-ubuntu-24.04-4
    container:
      image: savonet/liquidsoap-ci:debian_trixie@sha256:dc7cb6d629091da7cc938e7e3d2d88b3830894c85d0700065c73cceeca5cf5ab
      options: --user root
    env:
      HOME: /home/opam
    steps:
      - name: Checkout code
        run: |
          cd /tmp/liquidsoap-full/liquidsoap
          sudo -u opam -E git remote set-url origin https://github.com/savonet/liquidsoap.git
          sudo -u opam -E git fetch origin ${{ inputs.sha }}
          sudo -u opam -E git checkout ${{ inputs.sha }}
          mv .git /tmp
          rm -rf ./*
          mv /tmp/.git .
          sudo -u opam -E git reset --hard
      - name: Install npm
        run: |
          apt-get update
          apt-get install -y npm
      - name: Build JS
        run: |
          cd /tmp/liquidsoap-full/liquidsoap
          sudo -u opam -E opam update
          sudo -u opam -E opam upgrade -y
          sudo -u opam -E opam exec -- dune build --profile release src/js --verbose
      - name: Upload JS artifact
        uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: liquidsoap-js-${{ inputs.branch }}
          path: |
            /tmp/liquidsoap-full/liquidsoap/_build/default/src/js/interactive_js.bc.js
            /tmp/liquidsoap-full/liquidsoap/_build/default/src/js/index.html
            /tmp/liquidsoap-full/liquidsoap/_build/default/src/js/playground.bundle.js
          if-no-files-found: error