Skip to content

Build native library #11

Build native library

Build native library #11

Workflow file for this run

name: Build native library
on: workflow_dispatch
jobs:
build-linux:
strategy:
matrix:
cxx_std: [c++17]
runs-on: ubuntu-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev xvfb -y
- name: Build and run tests
run: xvfb-run ./webview/script/build.sh
- uses: actions/upload-artifact@v3
with:
name: linux-x64-webview-library
path: ./webview/build/library/libwebview.so
build-macos-x64:
strategy:
matrix:
cxx_std: [c++20]
runs-on: macos-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Build and run tests
run: ./webview/script/build.sh info clean format deps check build test
- uses: actions/upload-artifact@v3
with:
name: macos-x64-webview-library
path: ./webview/build/library/libwebview.dylib
build-windows-x64-msvc:
strategy:
matrix:
cxx_std: [c++20]
arch: [x64]
runs-on: windows-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
TARGET_ARCH: ${{ matrix.arch }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Build and run tests
run: ./webview/script/build.bat info clean format deps check build test
shell: cmd
- uses: actions/upload-artifact@v3
with:
name: windows-x64-webview-library
path: ./webview/build/library/webview.dll
build-windows-x86-msvc:
strategy:
matrix:
cxx_std: [c++20]
arch: [x86]
runs-on: windows-latest
env:
CXX_STD: ${{ matrix.cxx_std }}
TARGET_ARCH: ${{ matrix.arch }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true
- name: Build and run tests
run: ./webview/script/build.bat info clean format deps check build test
shell: cmd
- uses: actions/upload-artifact@v3
with:
name: windows-x86-webview-library
path: ./webview/build/library/webview.dll
push-libraries:
runs-on: ubuntu-latest
needs:
[
build-linux,
build-macos-x64,
build-windows-x64-msvc,
build-windows-x86-msvc,
]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: windows-x64-webview-library
path: src/WebView/runtimes/win-x64/native
- uses: actions/download-artifact@v3
with:
name: windows-x86-webview-library
path: src/WebView/runtimes/win-x86/native
- uses: actions/download-artifact@v3
with:
name: macos-x64-webview-library
path: src/WebView/runtimes/osx-x64/native
- run: |
git config --global user.name 'ktlwap Automation Bot'
git config --global user.email 'ktlwap@users.noreply.github.com'
git add -A
git commit -am "Update native libraries"
git push