-
Notifications
You must be signed in to change notification settings - Fork 2
120 lines (102 loc) · 4.14 KB
/
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
# This workflow will build the browser and publish it to GitHub Packages
name: Build browser
on: push
jobs:
browser-jni:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Set up Workspace
run: |
mkdir -p cef/Release
rm -rf java/org.eclipse.set.browser.cef.win32/res/cef
mkdir -p java/org.eclipse.set.browser.cef.win32/res/cef
mkdir -p java/org.eclipse.set.browser.lib/res
shell: bash
- name: Cache CEF
id: cef-cache
uses: actions/cache@v3
with:
path: |
java/org.eclipse.set.browser.cef.win32/res/cef
cef/Release/libcef.lib
cef/Release/LICENSE.txt
key: ${{ hashFiles('CEF_VERSION.txt') }}
- name: Download CEF
if: steps.cef-cache.outputs.cache-hit != 'true'
run: |
VERSION=$(grep -E -v ^# ../../CEF_VERSION.txt)
curl -o cef.tar.bz2 https://cef-builds.spotifycdn.com/$VERSION.tar.bz2
tar xf cef.tar.bz2 $VERSION/LICENSE.txt $VERSION/Resources --strip-components 1
tar xf cef.tar.bz2 $VERSION/Release/libcef.lib --strip-components 2
tar xf cef.tar.bz2 --wildcards $VERSION/Release/*.dll --wildcards $VERSION/Release/*.bin --strip-components 2
cp -r *.dll *.bin Resources/* LICENSE.txt ../../java/org.eclipse.set.browser.cef.win32/res/cef
ls -avl ../../java/org.eclipse.set.browser.cef.win32/res/cef
working-directory: cef/Release
shell: bash
- name: Build Rust
run: cargo clean && cargo build --release
working-directory: native
shell: bash
- name: Archive binaries
uses: actions/upload-artifact@v4
with:
name: chromium-swt-libs
path: native/target/release/chromium_*.*
retention-days: 1
build:
needs:
- browser-jni
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: eclipse-set/build/.github/actions/setup-java@main
- name: Set up Workspace
run: |
mkdir -p cef/Release
rm -rf java/org.eclipse.set.browser.cef.win32/res/cef
mkdir -p java/org.eclipse.set.browser.cef.win32/res/cef
mkdir -p java/org.eclipse.set.browser.lib/res
- name: Cache CEF
id: cef-cache
uses: actions/cache@v3
with:
path: |
java/org.eclipse.set.browser.cef.win32/res/cef
cef/Release/libcef.lib
cef/Release/LICENSE.txt
key: ${{ hashFiles('CEF_VERSION.txt') }}
- name: Download CEF
if: steps.cef-cache.outputs.cache-hit != 'true'
run: |
VERSION=$(grep -E -v ^# ../../CEF_VERSION.txt)
wget https://cef-builds.spotifycdn.com/$VERSION.tar.bz2 -O cef.tar.bz2
tar xf cef.tar.bz2 $VERSION/LICENSE.txt $VERSION/Resources --strip-components 1
tar xf cef.tar.bz2 $VERSION/Release/libcef.lib --strip-components 2
tar xf cef.tar.bz2 --wildcards $VERSION/Release/*.dll --wildcards $VERSION/Release/*.bin --strip-components 2
cp -r *.dll *.bin Resources/* LICENSE.txt ../../java/org.eclipse.set.browser.cef.win32/res/cef
ls -avl ../../java/org.eclipse.set.browser.cef.win32/res/cef
working-directory: cef/Release
- name: Fetch Rust binaries
uses: actions/download-artifact@v4
with:
name: chromium-swt-libs
path: java/org.eclipse.set.browser.lib/res/
- name: Build
run: mvn -T 1.5C -B clean verify
- name: Publish
run: mvn -T 1.5C -B deploy -DaltDeploymentRepository=set-github::https://maven.pkg.github.com/${{ github.repository }}
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Trigger SET
if: github.ref == 'refs/heads/main' && github.repository_owner == 'eclipse-set'
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2.1.2
with:
token: ${{ secrets.GH_BOT_TOKEN }}
repository: eclipse-set/set
event-type: "Rebuild with browser update ${{ github.run_number }}"