This repository was archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
112 lines (112 loc) · 4.22 KB
/
release.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: publish release
on:
push:
tags:
- v*
jobs:
build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-arm64-latest
- windows-latest
- macos-latest
steps:
-
name: Setup (Macos)
if: runner.os == 'Macos'
run: brew install python-setuptools
-
name: Build (Unix)
if: runner.os != 'Windows'
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:$(pwd)/depot_tools
gclient config --name src https://chromium.googlesource.com/libyuv/libyuv
gclient sync
cd src
cmake -DCMAKE_BUILD_TYPE="Release" .
cmake --build . --config Release
-
name: Build (Windows)
if: runner.os == 'Windows'
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$env:PATH += ";$(Get-Location)\depot_tools"
$env:DEPOT_TOOLS_WIN_TOOLCHAIN=0
gclient config --name src https://chromium.googlesource.com/libyuv/libyuv
gclient sync
cd src
cmake -DCMAKE_BUILD_TYPE="Release" .
cmake --build . --config Release
-
name: Rename library (Windows)
if: runner.os == 'Windows'
run: cp ./src/Release/yuv.lib ./yuv-windows-${{ matrix.arch }}.lib
-
name: Rename library (Linux)
if: matrix.os == 'ubuntu-latest'
run: cp ./src/libyuv.a ./libyuv-linux-x86_64.a
-
name: Rename library (Linux)
if: matrix.os == 'ubuntu-arm64-latest'
run: cp ./src/libyuv.a ./libyuv-linux-aarch64.a
-
name: Rename library (Macos)
if: runner.os == 'Macos'
run: cp ./src/libyuv.a ./libyuv-macos-${{ matrix.arch }}.a
-
name: Upload artifact (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: 'linux-x86_64'
path: './libyuv-linux-x86_64.a'
retention-days: 1
-
name: Upload artifact (Linux)
if: matrix.os == 'ubuntu-arm64-latest'
uses: actions/upload-artifact@v4
with:
name: 'linux-aarch64'
path: './libyuv-linux-aarch64.a'
retention-days: 1
-
name: Upload artifact (Macos)
if: runner.os == 'Macos'
uses: actions/upload-artifact@v4
with:
name: 'macos-${{ matrix.arch }}'
path: './libyuv-macos-${{ matrix.arch }}.a'
retention-days: 1
-
name: Upload artifact (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: 'windows-${{ matrix.arch }}'
path: './yuv-windows-${{ matrix.arch }}.lib'
retention-days: 1
deploy:
needs: build
runs-on: ubuntu-latest
steps:
-
name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
-
name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
tag_name: '${{ github.ref_name }}'
name: '${{ github.ref_name }}'
draft: false
prerelease: false
files: artifacts/**/*