deno.land / x / skia_canvas@0.5.8 / .github / workflows / ci.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
113
114
115
116
117
118
119
120
121
122
name: CI
on: push: branches: [main] pull_request: branches: [main]
jobs: fmt: runs-on: ubuntu-latest steps: - name: Setup repo uses: actions/checkout@v2
- name: Setup Deno uses: denoland/setup-deno@main with: deno-version: 'v1.x'
- name: Check Formatting run: deno fmt --check
test: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }}
steps: - name: Setup repo uses: actions/checkout@v3 with: submodules: true
- name: Setup Deno uses: denoland/setup-deno@main with: deno-version: 'v1.x'
- name: Setup Depot Tools (Unix) if: runner.os != 'Windows' run: | git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git echo "PATH=$(pwd)/depot_tools:$PATH" >> $GITHUB_ENV
- name: Setup Depot Tools (Windows) if: runner.os == 'Windows' run: | curl -o depot_tools.zip https://storage.googleapis.com/chrome-infra/depot_tools.zip mkdir depot_tools cd depot_tools 7z x ../depot_tools.zip cd .. echo "PATH=$(pwd)/depot_tools;$PATH" >> $GITHUB_ENV
- name: Install dependencies (Linux) if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install xorg-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libgl1-mesa-glx libglx-dev
- name: Download Skia Binaries env: SKIA_FROM_SOURCE: 0 run: deno task build-skia
- name: Setup Build Directory run: mkdir ./native/build
- name: Build Native Library (Unix) if: runner.os != 'Windows' run: deno task build
- name: Build Native Library (macOS x86_64) if: runner.os == 'macOS' env: TARGET_ARCH: x86_64 run: | deno task build-skia cp ./native/build/libnative_canvas{,_aarch64}.dylib deno task build-macos-x86_64 cp ./native/build/libnative_canvas{,_x86_64}.dylib cp ./native/build/libnative_canvas{_aarch64,}.dylib - name: Build Native Library (Windows) if: runner.os == 'Windows' run: deno task build-win
- name: Strip Native Library (Linux) if: runner.os == 'Linux' run: strip ./native/build/libnative_canvas.so
- name: Setup ICU Data if: runner.os == 'Windows' run: cp ./skia/out/Release/icudtl.dat ./native/build/Release/icudtl.dat
- name: Run Tests env: DENO_SKIA_LOCAL: 1 run: deno run -A --unstable test/test.ts
- name: Rename x86_64 binary (macOS) if: runner.os == 'macOS' run: cp ./native/build/libnative_canvas{_x86_64,}.dylib
- name: Release uses: softprops/action-gh-release@master if: ${{ github.ref == 'refs/heads/main' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: "release draft" draft: true files: | skia/out/Release/icudtl.dat native/build/libnative_canvas.so native/build/libnative_canvas.dylib native/build/libnative_canvas_aarch64.dylib native/build/Release/native_canvas.dll
skia_canvas

Version Info

Tagged at
8 months ago