Skip to content

Commit 11e59e2

Browse files
committed
feat: add arm64 build action
1 parent 0f6c802 commit 11e59e2

4 files changed

Lines changed: 118 additions & 6 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build on Linux arm64
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- ".github/workflows/build-linux-arm64.yml"
8+
- "CMakeLists.txt"
9+
- "CefConfig.cmake"
10+
- "include/**"
11+
- "src/**"
12+
13+
pull_request:
14+
branches: [main]
15+
paths:
16+
- "CMakeLists.txt"
17+
- "CefConfig.cmake"
18+
- "include/**"
19+
- "src/**"
20+
21+
env:
22+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
23+
BUILD_TYPE: Release
24+
25+
jobs:
26+
build:
27+
# The CMake configure and build commands are platform agnostic and should work equally
28+
# well on Windows or Mac. You can convert this to a matrix build if you need
29+
# cross-platform coverage.
30+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
31+
runs-on: ubuntu-22.04-arm
32+
33+
steps:
34+
- name: Checkout Source
35+
uses: actions/checkout@v2
36+
with:
37+
submodules: "true"
38+
39+
- name: Cache CEF folders
40+
uses: actions/cache@v3
41+
with:
42+
path: ${{github.workspace}}/dep
43+
key: ${{ runner.os }}-dep-cef
44+
45+
- name: Install x11
46+
run: |
47+
sudo apt-get install -y libc++-dev libc++abi-dev libx11-dev
48+
49+
- name: Configure CMake
50+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
51+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
52+
run: |
53+
cmake \
54+
-B ${{github.workspace}}/build \
55+
-DCMAKE_C_COMPILER=clang \
56+
-DCMAKE_CXX_COMPILER=clang++ \
57+
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -mno-outline-atomics" \
58+
-DPROJECT_ARCH=arm64 \
59+
-DTARGET_ARCH=arm64 \
60+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
61+
-DUSE_SANDBOX=ON \
62+
-DCEFVIEW_WING_NAME=UCefViewHelper \
63+
-DCEF_SDK_VERSION="126.2.18+g3647d39+chromium-126.0.6478.183" \
64+
-DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/install
65+
66+
- name: Build
67+
# Build your program with the given configuration
68+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
69+
70+
- name: Install
71+
# Collect the output
72+
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
73+
74+
- name: Create artifact
75+
uses: actions/upload-artifact@v4
76+
# Upload artifact
77+
with:
78+
name: CefViewCore.Linux.Arm64
79+
path: ${{github.workspace}}/install

.github/workflows/build-linux-x86_64.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build on Linux
1+
name: Build on Linux x86_64
22

33
on:
44
push:
@@ -48,8 +48,19 @@ jobs:
4848
- name: Configure CMake
4949
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5050
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
51-
run: cmake -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_SANDBOX=ON
51+
run: cmake -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_SANDBOX=ON -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/install
5252

5353
- name: Build
5454
# Build your program with the given configuration
5555
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
56+
57+
- name: Install
58+
# Collect the output
59+
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
60+
61+
- name: Create artifact
62+
uses: actions/upload-artifact@v4
63+
# Upload artifact
64+
with:
65+
name: CefViewCore.Linux.x86_64
66+
path: ${{github.workspace}}/install

.github/workflows/build-macos-x86_64.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build on macOS
1+
name: Build on macOS x86_64
22

33
on:
44
push:
@@ -50,8 +50,19 @@ jobs:
5050
- name: Configure CMake
5151
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5252
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
53-
run: cmake -G "Xcode" -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DTARGET_ARCH=x86_64 -DUSE_SANDBOX=ON
53+
run: cmake -G "Xcode" -B ${{github.workspace}}/build -DPROJECT_ARCH=x86_64 -DTARGET_ARCH=x86_64 -DUSE_SANDBOX=ON -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/install
5454

5555
- name: Build
5656
# Build your program with the given configuration
5757
run: xcodebuild -project ${{github.workspace}}/build/CefViewCore.xcodeproj -configuration ${{env.BUILD_TYPE}}
58+
59+
- name: Install
60+
# Collect the output
61+
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
62+
63+
- name: Create artifact
64+
uses: actions/upload-artifact@v4
65+
# Upload artifact
66+
with:
67+
name: CefViewCore.macOS.x86_64
68+
path: ${{github.workspace}}/install

.github/workflows/build-windows-x86_64.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build on Windows
1+
name: Build on Windows x86_64
22

33
on:
44
push:
@@ -45,8 +45,19 @@ jobs:
4545
- name: Configure CMake
4646
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4747
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
48-
run: cmake -B ${{github.workspace}}/build -A x64 -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
48+
run: cmake -B ${{github.workspace}}/build -A x64 -DPROJECT_ARCH=x86_64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX:PATH=${{github.workspace}}/install
4949

5050
- name: Build
5151
# Build your program with the given configuration
5252
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
53+
54+
- name: Install
55+
# Collect the output
56+
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
57+
58+
- name: Create artifact
59+
uses: actions/upload-artifact@v4
60+
# Upload artifact
61+
with:
62+
name: CefViewCore.Windows.x86_64
63+
path: ${{github.workspace}}/install

0 commit comments

Comments
 (0)