forked from Gericom/FastVideoDSEncoder
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 2.21 KB
/
Copy pathgithub-actions-demo.yml
File metadata and controls
44 lines (44 loc) · 2.21 KB
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
name: FastVideoDSEncoderLinux
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
release:
types: [created]
jobs:
Build_FastVideoDSEncoder_for_Linux:
runs-on: ubuntu-latest
container: debian
steps:
#- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
#- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
#- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: Show github event info
run: cat $GITHUB_EVENT_PATH
#- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
#- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: Install build deps
run: |
apt update
yes | apt install wget
wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt update
yes | apt install gcc g++ nasm yasm git pkg-config make cmake ninja-build meson autoconf libtool bzip2 libz-dev dotnet-sdk-6.0 jq curl
- name: build pkgtools
run: ./build.sh pkgtools
- name: download ffmpeg shared libs
run: ./build.sh ffmpeg
- name: build FastVideoDSEncoder
run: ./build.sh FastVideoDSEncoder
- name: test and upload
run: |
./build/FastVideoDSEncoder
ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
CONTENT_LENGTH="Content-Length: $(stat -c%s build/FastVideoDSEncoder)"
CONTENT_TYPE="Content-Type: application/x-elf"
UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=FastVideoDSEncoder"
curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "build/FastVideoDSEncoder" "$UPLOAD_URL"
- run: echo "🍏 This job's status is ${{ job.status }}."