Skip to content

Commit 90bdc71

Browse files
authored
Set up GitHub Actions (#1)
* Set up github actions
1 parent 499fefa commit 90bdc71

File tree

38 files changed

+100
-678
lines changed

38 files changed

+100
-678
lines changed

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# This workflow will build the browser and publish it to GitHub Packages
2+
3+
name: Build browser
4+
5+
on: push
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Rust
17+
run: rustup target add x86_64-pc-windows-gnu
18+
19+
- name: Install MinGW
20+
run: sudo apt-get install --assume-yes --no-install-recommends gcc-mingw-w64 libz-mingw-w64-dev
21+
22+
- name: Set up JDK
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '17'
26+
distribution: temurin
27+
server-id: set-github
28+
cache: maven
29+
30+
- name: Set up Workspace
31+
run: |
32+
mkdir -p cef/Release
33+
rm -rf java/org.eclipse.set.browser.cef.win32/res/cef
34+
mkdir -p java/org.eclipse.set.browser.cef.win32/res/cef
35+
mkdir -p java/org.eclipse.set.browser.lib/res
36+
37+
- name: Cache CEF
38+
id: cef-cache
39+
uses: actions/cache@v3
40+
with:
41+
path: |
42+
java/org.eclipse.set.browser.cef.win32/res/cef
43+
cef/Release/libcef.lib
44+
cef/Release/LICENSE.txt
45+
key: ${{ hashFiles('CEF_VERSION.txt') }}
46+
47+
- name: Download CEF
48+
if: steps.cef-cache.outputs.cache-hit != 'true'
49+
run: |
50+
VERSION=$(grep -E -v ^# ../../CEF_VERSION.txt)
51+
wget https://cef-builds.spotifycdn.com/$VERSION.tar.bz2 -O cef.tar.bz2
52+
tar xf cef.tar.bz2 $VERSION/LICENSE.txt --strip-components 1
53+
tar xf cef.tar.bz2 $VERSION/Release/libcef.lib --strip-components 2
54+
tar xf cef.tar.bz2 --wildcards $VERSION/Release/*.dll --wildcards $VERSION/Release/*.bin --strip-components 2
55+
cp -r *.dll *.bin LICENSE.txt ../../java/org.eclipse.set.browser.cef.win32/res/cef
56+
working-directory: cef/Release
57+
58+
- name: Build Rust
59+
run: cargo clean && cargo build --release --target x86_64-pc-windows-gnu
60+
working-directory: native
61+
62+
- name: Copy binaries
63+
run: |
64+
cp native/target/x86_64-pc-windows-gnu/release/chromium_subp.exe java/org.eclipse.set.browser.lib/res/
65+
cp native/target/x86_64-pc-windows-gnu/release/chromium_jni.dll java/org.eclipse.set.browser.lib/res/
66+
67+
- name: Set up Maven
68+
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5
69+
with:
70+
maven-version: 3.9.3
71+
72+
- name: Build
73+
run: mvn -T 1.5C -B clean verify
74+
working-directory: java
75+
76+
- name: Publish
77+
run: mvn -T 1.5C -B deploy
78+
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
79+
working-directory: java
80+
env:
81+
GITHUB_TOKEN: ${{ github.token }}

ci/Jenkinsfile

Lines changed: 0 additions & 89 deletions
This file was deleted.

ci/Jenkinsfile.cef

Lines changed: 0 additions & 55 deletions
This file was deleted.

ci/kubernetes.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

java-cef/org.eclipse.set.browser.cef.feature/.project

Lines changed: 0 additions & 17 deletions
This file was deleted.

java-cef/org.eclipse.set.browser.cef.feature/build.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

java-cef/org.eclipse.set.browser.cef.feature/feature.xml

Lines changed: 0 additions & 20 deletions
This file was deleted.

java-cef/org.eclipse.set.browser.cef.feature/pom.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

java-cef/org.eclipse.set.browser.cef.releng.repository/.project

Lines changed: 0 additions & 11 deletions
This file was deleted.

java-cef/org.eclipse.set.browser.cef.releng.repository/.settings/org.eclipse.core.resources.prefs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)