aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/benchmark.yml
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-01 14:14:58 +0100
committerChocobozzz <me@florianbigard.com>2021-12-03 10:14:17 +0100
commit51e9e152f7df003c65c16f822669a0674efcaf03 (patch)
treea18abdf95bfc449d8d08e4c47e8ccc7ee094bbf4 /.github/workflows/benchmark.yml
parentf3fbbf01402fc7491e044f160edca06ef793eb50 (diff)
downloadPeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.gz
PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.zst
PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.zip
Build nightly using github action
Diffstat (limited to '.github/workflows/benchmark.yml')
-rw-r--r--.github/workflows/benchmark.yml69
1 files changed, 10 insertions, 59 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 86f675432..f02b88a42 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -29,48 +29,15 @@ jobs:
29 env: 29 env:
30 PGUSER: peertube 30 PGUSER: peertube
31 PGHOST: localhost 31 PGHOST: localhost
32 NODE_PENDING_JOB_WAIT: 500
33 32
34 steps: 33 steps:
35 - uses: actions/checkout@v2 34 - uses: actions/checkout@v2
36 35
37 - name: Use Node.js 36 - uses: './.github/actions/reusable-prepare-peertube-build'
38 uses: actions/setup-node@v1
39 with: 37 with:
40 node-version: '12.x' 38 node-version: '12.x'
41 39
42 - name: Setup system dependencies 40 - uses: './.github/actions/reusable-prepare-peertube-run'
43 run: |
44 sudo apt-get install postgresql-client-common redis-tools parallel
45 wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.3.1-64bit-static.tar.xz"
46 tar xf ffmpeg-release-4.3.1-64bit-static.tar.xz
47 mkdir -p $HOME/bin
48 cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin
49 echo "$HOME/bin" >> $GITHUB_PATH
50
51 - name: Cache Node.js modules
52 uses: actions/cache@v2
53 with:
54 path: |
55 **/node_modules
56 key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
57 restore-keys: |
58 ${{ runner.OS }}-node-
59 ${{ runner.OS }}-
60
61 - name: Cache fixtures
62 uses: actions/cache@v2
63 with:
64 path: |
65 fixtures
66 key: ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-${{ hashFiles('fixtures/*') }}
67 restore-keys: |
68 ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-
69 ${{ runner.OS }}-fixtures-
70 ${{ runner.OS }}-
71
72 - name: Install dependencies
73 run: yarn install --frozen-lockfile
74 41
75 - name: Build 42 - name: Build
76 run: | 43 run: |
@@ -111,27 +78,11 @@ jobs:
111 cat benchmark.json build-time.json startup-time.json 78 cat benchmark.json build-time.json startup-time.json
112 79
113 - name: Upload benchmark result 80 - name: Upload benchmark result
114 env: 81 uses: './.github/actions/reusable-deploy.yml'
115 STATS_DEPLOYEMENT_KNOWN_HOSTS: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} 82 with:
116 STATS_DEPLOYEMENT_KEY: ${{ secrets.STATS_DEPLOYEMENT_KEY }} 83 source: benchmark.json build-time.json startup-time.json
117 STATS_DEPLOYEMENT_USER: ${{ secrets.STATS_DEPLOYEMENT_USER }} 84 destination: peertube-stats
118 STATS_DEPLOYEMENT_HOST: ${{ secrets.STATS_DEPLOYEMENT_HOST }} 85 knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }}
119 run: | 86 deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }}
120 mkdir -p ~/.ssh 87 deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }}
121 chmod 700 ~/.ssh 88 deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }}
122 if [ ! -z ${STATS_DEPLOYEMENT_KNOWN_HOSTS+x} ]; then
123 echo "Adding ssh key to known hosts"
124 echo -e "${STATS_DEPLOYEMENT_KNOWN_HOSTS}" > ~/.ssh/known_hosts;
125 fi
126
127 eval `ssh-agent -s`
128
129 if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then
130 echo "Adding ssh reployement key"
131 ssh-add <(echo "${STATS_DEPLOYEMENT_KEY}");
132 fi
133
134 if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then
135 echo "Uploading files"
136 scp benchmark.json build-time.json startup-time.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats;
137 fi