Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from webui-dev:main #13

Merged
merged 287 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
287 commits
Select commit Hold shift + click to select a range
736cd41
Update zig example build command in workflow
ttytm May 27, 2024
6ec0c7b
Update linked lib and frameworks
ttytm May 28, 2024
c4485be
Fix assigning incompatible ptr in webview windows function
ttytm May 28, 2024
5baf13a
Run different zig build options in CI
ttytm May 28, 2024
3b3ccdf
Add setup-xcode action to fix bug with current default XCode CI version
ttytm May 29, 2024
f94fa66
Add verbose, build silent by default
ttytm May 29, 2024
9ca7c3c
Run CI zig builds verbose
ttytm May 29, 2024
58f7648
Sort params
ttytm May 29, 2024
cd06462
Merge pull request #369 from ttytm/build/update-zig-11-build
hassandraga May 29, 2024
225f818
Faster window exit
hassandraga May 29, 2024
8d94cdc
Rename WebUI Nightly Development Build
hassandraga May 29, 2024
9c9b3dc
Adding webui_get_float
hassandraga May 29, 2024
1923436
Float example
hassandraga May 29, 2024
a7475d1
Support compiling with zig versions 0.12.0 and above
ttytm May 29, 2024
21da984
CI include Zig 0.12.0 compilation tests in workflow
ttytm May 29, 2024
19b2e32
Adding webui_get_count
hassandraga May 29, 2024
b61b145
Arguments count example
hassandraga May 29, 2024
b4d428d
Merge pull request #373 from webui-dev/zig-12+
ttytm May 29, 2024
065cd3f
webui_show_wv default center
hassandraga May 29, 2024
4517ba4
Adding webui_return_float
hassandraga May 29, 2024
cdc1d29
Update variable type in `_webui_round_to_memory_block` to resolve sin…
ttytm May 30, 2024
6d83d7e
Update linux webview positon fallback values values to match type dec…
ttytm May 30, 2024
ce3dce4
Merge pull request #376 from ttytm/fix/sign-comp
hassandraga May 30, 2024
a1c6802
Fix warnings - Safe sprintf
hassandraga May 30, 2024
34e9b10
Fix warnings - Safe strtok
hassandraga May 30, 2024
a8709a7
Fix webui_set_position args
hassandraga May 30, 2024
6ae5046
Fix warnings - Safe strcpy
hassandraga May 30, 2024
d25ae31
Fix warnings - Safe strcat
hassandraga May 30, 2024
36e268c
Fix warnings - Safe fopen
hassandraga May 30, 2024
72737ea
Fix WEBUI_SPF
hassandraga May 30, 2024
d3038f6
Fix all warnings (MSVC)
hassandraga May 30, 2024
2e17172
Fix warnings - casting
hassandraga May 30, 2024
4322522
Fix warnings - Linux
hassandraga May 30, 2024
272b44a
Prevent warnings from reminder definitions defined in civetweb thridp…
ttytm May 30, 2024
769b011
Print used compiler in logs
hassandraga May 31, 2024
d86a795
Fix runtime break
hassandraga May 31, 2024
c537df5
Fix runtime functionality
hassandraga May 31, 2024
570a917
Fix runtime functionality - Linux
hassandraga May 31, 2024
218a129
Merge pull request #377 from ttytm/fix/sign-comp2
hassandraga May 31, 2024
c8c1b2b
Merge pull request #361 from xland/patch-1
hassandraga May 31, 2024
6fe3549
Merge pull request #351 from GiuseppeCesarano/main
hassandraga May 31, 2024
817cc60
Merge pull request #326 from SpikeHD/expose_browser
hassandraga May 31, 2024
373c546
Merge pull request #310 from NicolasBFR/main
hassandraga May 31, 2024
41428a1
Update tagline
ttytm Jun 1, 2024
0ade1d9
Include nightly tests in zig workflow
ttytm Jun 1, 2024
7a1eb11
Add build support with zig `0.13.0-dev`
ttytm Jun 1, 2024
ade685f
Merge pull request #384 from ttytm/build/zig-nightly
ttytm Jun 1, 2024
0878256
Merge pull request #382 from ttytm/update-description
ttytm Jun 1, 2024
4694a29
Fix missing some HTTP files
hassandraga Jun 1, 2024
bcf0887
Removing dup internal calls
hassandraga Jun 1, 2024
c853979
Fix webui_get_best_browser
hassandraga Jun 1, 2024
4466bcf
Update webui_get_best_browser description
hassandraga Jun 1, 2024
37bdee4
Use singular form for enum names
ttytm Jun 2, 2024
bf87e04
Rename `webui_config` to `webui_set_config`
ttytm Jun 2, 2024
6243192
Merge pull request #387 from ttytm/update-enums
ttytm Jun 3, 2024
33fd4a2
Make minor cleanups in `build.zig` (#389)
ttytm Jun 3, 2024
d982e5b
README: add Common Lisp wrapper
vindarel Jun 3, 2024
26c9126
Merge pull request #390 from vindarel/main
neroist Jun 3, 2024
3de023e
Add issue templates
ttytm Jun 4, 2024
ecea17c
Merge pull request #393 from ttytm/issue-templates
neroist Jun 4, 2024
a29b075
Unfinished - WebView Auto JS Inject
hassandraga Jun 4, 2024
d46f806
Win32 - Faster browser load when WebView is not available
hassandraga Jun 4, 2024
4b8b4fa
Linux - Faster browser load when GTK WebView is not available
hassandraga Jun 4, 2024
cf9764a
Use semver compliant version specification
ttytm Jun 4, 2024
62a3b79
Linux - C++ Adding -LDL lib
hassandraga Jun 5, 2024
6e775b2
Linux - C Adding -LDL lib
hassandraga Jun 5, 2024
743fe3d
Add internal safe std (dyn and static)
hassandraga Jun 5, 2024
386a260
Apply safe std (dyn and static)
hassandraga Jun 5, 2024
d8008e3
Update version after suggestions
ttytm Jun 5, 2024
3ab322a
Update format specification in debug print
ttytm Jun 5, 2024
3088951
Merge pull request #396 from ttytm/fix/macos-dbg-print
hassandraga Jun 5, 2024
97d7543
Merge pull request #394 from ttytm/semver-version
hassandraga Jun 5, 2024
67179f5
Suppress Warnings
hassandraga Jun 5, 2024
0462ca7
Fix WS close warning
hassandraga Jun 5, 2024
a6aee12
Single Port for HTTP and WS
hassandraga Jun 6, 2024
8b715e6
Fix Single Port Redirection
hassandraga Jun 6, 2024
1e6196c
Merge pull request #378 from ttytm/prevent-civetweb-warnings
hassandraga Jun 6, 2024
6c41d8d
Remove platform-dependent CSS and use browser titlebar
malisipi Jun 6, 2024
b57a803
Merge pull request #398 from malisipi/main
neroist Jun 6, 2024
ced5d97
Fix wv crash after browser show
hassandraga Jun 7, 2024
9039c31
Adding isConnected to the JavaScript bridge
hassandraga Jun 7, 2024
eacce2e
attempt to fix index in parse
dgllghr Jun 9, 2024
ee90585
fix index for command data
dgllghr Jun 9, 2024
ab827e0
Merge pull request #400 from dgllghr/fix-send-raw-parse
hassandraga Jun 9, 2024
2716081
fix: zig nightly becomes `0.14.0`
jinzhongjia Jun 9, 2024
c2bdc44
update workflows zig version
jinzhongjia Jun 9, 2024
926dd93
Merge pull request #401 from webui-dev/zig-nightly
hassandraga Jun 9, 2024
cdce834
Add readme about required modifications to civetweb
ttytm Jun 9, 2024
c3e2e82
Merge pull request #402 from ttytm/civetweb-readme
ttytm Jun 9, 2024
561c044
Update readme about required modifications
hassandraga Jun 9, 2024
45c973a
Fix conflict with including dirent
ttytm Jun 9, 2024
4f2ccfb
Merge pull request #403 from ttytm/fix/dirent-conflict
ttytm Jun 9, 2024
5be9d90
Add CGO check
ttytm Jun 9, 2024
f182a12
Merge pull request #404 from ttytm/main
hassandraga Jun 9, 2024
4fb247e
Adding Event Block APIs
hassandraga Jun 11, 2024
20c350e
Fix Event Block
hassandraga Jun 11, 2024
93d78bf
Fix Bridge Navigation Event
hassandraga Jun 11, 2024
911fe33
Windows TLS CI
hassandraga Jun 11, 2024
7d25559
Fix Windows TLS CI
hassandraga Jun 11, 2024
bf1a443
Fix Windows TLS CI (Env)
hassandraga Jun 11, 2024
cb76e0a
Fix Windows TLS CI (OpenSSL Env)
hassandraga Jun 11, 2024
2257b94
Fix Windows TLS CI (OpenSSL Path)
hassandraga Jun 11, 2024
6e15893
Update OpenSSL links
hassandraga Jun 12, 2024
a1e4ef5
Assert
hassandraga Jun 12, 2024
d4e6d5f
Fix TLS MSVC
hassandraga Jun 12, 2024
cc3df4f
Moving TLS include step
hassandraga Jun 12, 2024
1416e00
Limit releases to webui origin repo
ttytm Jun 12, 2024
545c4f5
Merge pull request #408 from ttytm/ci/limit-releases
hassandraga Jun 12, 2024
179039b
Simplify artifact building on linux and macos
ttytm Jun 12, 2024
a4f0490
Simplify building artifacts on windows
ttytm Jun 12, 2024
109063e
Merge pull request #409 from ttytm/ci/simplify-artifact-building
hassandraga Jun 12, 2024
a860746
Fix windows artifact name
ttytm Jun 12, 2024
d394a2f
* Rename `webui_set_event_block` to `webui_set_event_blocking`
hassandraga Jun 12, 2024
934727b
Add ` --auto-accept-camera-and-microphone-capture` to chromium flags
neroist Jun 12, 2024
02aeef6
Merge pull request #410 from webui-dev/neroist-patch-1
hassandraga Jun 12, 2024
2135b09
Refine workflows, improve maintainability
ttytm Jun 13, 2024
92b7fc7
Display nightly build date in title
ttytm Jun 13, 2024
486df2e
Include tests with different compilers when building examples on Linux
ttytm Jun 13, 2024
0ae019b
Merge pull request #412 from ttytm/ci/refine
hassandraga Jun 13, 2024
e8e4220
Include TLS builds in artifact uploads on Linux and macOS
ttytm Jun 13, 2024
ea5540c
Merge pull request #413 from ttytm/ci/tls-linux-macos
hassandraga Jun 13, 2024
23da99b
Fix condition for release steps when pushing tags
ttytm Jun 15, 2024
18f8a1e
Fix compiling with swift due to incompatible civetweb structname
ttytm Jun 15, 2024
46b2228
Include change in civetweb readme
ttytm Jun 15, 2024
15d519c
Fix get_new_window_id
hassandraga Jun 15, 2024
9518b9e
Merge pull request #415 from ttytm/ci/fix-release-cond
ttytm Jun 15, 2024
d4c1415
Add test
ttytm Jun 15, 2024
218093b
Update .gitignore to ignore all sublevel build binaries
ttytm Jun 15, 2024
da7be60
Run test in CI
ttytm Jun 15, 2024
5a40b92
Extend test to test passing js args to C
ttytm Jun 15, 2024
6d1428a
Update test makefile to build test files
ttytm Jun 16, 2024
63b7cfd
Add failing_test.c
ttytm Jun 16, 2024
b9c4530
Include failing test in CI run to make sure tests can fail
ttytm Jun 16, 2024
e70f64e
Make labels in issue templates more consistent
ttytm Jun 16, 2024
6cefcb1
Merge pull request #421 from ttytm/ci/add-test
ttytm Jun 16, 2024
21118a5
Update labels in issue templates
ttytm Jun 16, 2024
5ed5d68
Add cprint test to solidify confirmations in CI test runs
ttytm Jun 16, 2024
da61335
Caputure and assert program output in CI
ttytm Jun 16, 2024
a86217e
Simplify TLS handling
ttytm Jun 16, 2024
56dc827
Utilize simplified way to pass additional TLS flags
ttytm Jun 16, 2024
6732b84
Only set CC if none is set (don't overwrite env CC)
ttytm Jun 16, 2024
8ab5408
Utilize CC not being overwritten
ttytm Jun 16, 2024
1048ffa
Merge pull request #422 from ttytm/build/tls
hassandraga Jun 17, 2024
2730c9d
Fix ignore all sublevel binaries
hassandraga Jun 18, 2024
c3ce70c
Rename Example IDs - text-editor
hassandraga Jun 18, 2024
c598ac9
Fix Deno FFI Warning
hassandraga Jun 18, 2024
90e774b
Rename Example IDs - serve_a_folder
hassandraga Jun 18, 2024
5657f3f
Fix NoBrowser Mode
hassandraga Jun 18, 2024
a046af2
Rename Example IDs - custom_web_server
hassandraga Jun 18, 2024
56420d6
Rename Example IDs - call_js_from_c
hassandraga Jun 19, 2024
5aa49f6
Rename Example IDs - call_c_from_js
hassandraga Jun 19, 2024
6e7a730
Add Step Linux ARM
hassandraga Jun 19, 2024
a628e07
Remove ARM from Linux.yml
hassandraga Jun 19, 2024
270c4de
Adding Linux ARM.yml
hassandraga Jun 19, 2024
104fd48
Upgrade OpenSSL to v3.3.1
hassandraga Jun 19, 2024
734511a
Fix compiled aarch64 objects
hassandraga Jun 19, 2024
c17dc92
Fix OpenSSL for aarch64 (ARM64)
hassandraga Jun 19, 2024
a0595d9
Fix aarch64 examples test build
hassandraga Jun 19, 2024
0af7813
Temporary disable aarch64 build test
hassandraga Jun 19, 2024
e934fe6
disable aarch64 build test
hassandraga Jun 19, 2024
d32f093
Simpler Bug Report Template
hassandraga Jun 21, 2024
775455c
Fix typos in the C header
hassandraga Jun 21, 2024
aca21d9
Adding some C++ APIs
hassandraga Jun 21, 2024
81c778c
Update C++ Examples
hassandraga Jun 21, 2024
c2f410d
Fix release tag workflow
hassandraga Jun 23, 2024
f40d35a
Faster ARM runners
hassandraga Jun 23, 2024
3bdacf4
Support to disable default high contrast of browser.
malisipi Jun 24, 2024
5399c1f
Support high contrast detection on Windows.
malisipi Jun 24, 2024
900e6f8
Add linux support
malisipi Jun 24, 2024
6b539c3
Merge pull request #433 from malisipi/high-contrast-management
hassandraga Jun 25, 2024
57f5fca
Fix MSVC Makefile unrecognized NO_SSL
hassandraga Jun 25, 2024
a93083b
Fix HTTP folder request
hassandraga Jun 25, 2024
b0dd088
Examples rename (webui.js) path to (/webui.js)
hassandraga Jun 25, 2024
8e8abd2
Up to Beta.2
hassandraga Jun 25, 2024
acc77ce
Update high contrast
hassandraga Jun 25, 2024
d0b013c
Adding webui_browser_exist
hassandraga Jun 25, 2024
88cd5f3
Adding JS API - isHighContrast
hassandraga Jun 25, 2024
b576b2f
Adding folder_monitor (config)
hassandraga Jun 26, 2024
9b79e73
Fix monitor_thread
hassandraga Jun 26, 2024
b65608d
Fix monitor_thread (typo)
hassandraga Jun 26, 2024
5a39692
Merge pull request #416 from ttytm/fix/swift
hassandraga Jun 29, 2024
88c9996
Multi-Client Design (Heavy Core Change)
hassandraga Jul 1, 2024
4caeb82
Update Bridge - One-time Token
hassandraga Jul 1, 2024
da7bb84
MSVC Makefile - Keep .pdb (Debug Symbols)
hassandraga Jul 1, 2024
d5a82f9
Fix All Event Client ID
hassandraga Jul 1, 2024
4116ec7
Bridge - Fix send raw size
hassandraga Jul 1, 2024
92e98e8
New multi-client APIs
hassandraga Jul 1, 2024
cc103aa
Header - New APIs
hassandraga Jul 1, 2024
bb887d7
New API webui_start_server
hassandraga Jul 2, 2024
327067c
Fix build warnings
hassandraga Jul 2, 2024
c4cc398
Adding webui_interface_get_float_at
hassandraga Jul 2, 2024
5f33f70
Updating embedded icon
hassandraga Jul 3, 2024
efe64ba
Updating example - public_network_access
hassandraga Jul 3, 2024
e8f6a8a
Cookies System (Heavy Core Changes)
hassandraga Jul 5, 2024
f25dd98
New Event Elements
hassandraga Jul 5, 2024
6ca7601
Adding new API webui_open_url
hassandraga Jul 5, 2024
56f787c
New example - web_app_multi_client
hassandraga Jul 5, 2024
836e1d1
Fix zig CI build
hassandraga Jul 5, 2024
57a5846
Test gcc-14 builds in CI
ttytm Jul 6, 2024
3b3e4c4
Resolve incompatible ptr warning to fix compatibility with gcc-14
ttytm Jul 6, 2024
89495f9
Merge pull request #442 from ttytm/fix/gcc-14-compatibility
hassandraga Jul 6, 2024
cdc78e4
Update default internal icon
hassandraga Jul 6, 2024
fb1607b
Fix Linux Exit
hassandraga Jul 7, 2024
13c889a
Update Text Editor Example
hassandraga Jul 7, 2024
59f2d07
Supporting Firefox Snap
hassandraga Jul 7, 2024
600e8d3
Fix Win32 Folder Check
hassandraga Jul 7, 2024
bdf6bac
Fix Makefile x86 and ARM conflict
hassandraga Jul 7, 2024
e443e31
Update readme
hassandraga Jul 7, 2024
923f487
Fix warnings
hassandraga Jul 7, 2024
4f6fbc5
Adding warnings for debug mode
hassandraga Jul 7, 2024
f888f15
fix: zig cross compile from linux to windows error
jinzhongjia Jul 8, 2024
faa02ad
Bridge - Auto-reconnect
hassandraga Jul 8, 2024
2a79c2b
Bridge Minified Version
hassandraga Jul 8, 2024
0440eea
Adding Bun Runtime
hassandraga Jul 8, 2024
50e9e4c
Update example (Bun - Deno - Nodejs)
hassandraga Jul 8, 2024
ff97452
Fix Header SameSite and CORS
hassandraga Jul 9, 2024
0346f0f
exposing _webui_get_free_port
sensiblearts Jul 9, 2024
51d82c8
tk
sensiblearts Jul 9, 2024
de95086
Merge pull request #448 from sensiblearts/main
hassandraga Jul 9, 2024
bbcdb9c
Modify _webui_http_handler() to handle a file before a path
nater0000 Jul 9, 2024
9ed9279
Added a function webui_get_port() to retrieve the server port for the…
nater0000 Jul 9, 2024
d01c8a8
Merge pull request #450 from nater0000/get_port
hassandraga Jul 9, 2024
9350a6a
Merge pull request #449 from nater0000/main
hassandraga Jul 9, 2024
af46c34
Fix C++ Header
hassandraga Jul 9, 2024
b2f505a
Update C Header - Adding et_mime_type
hassandraga Jul 9, 2024
1e8642b
Supporting header + body in webui_set_file_handler
hassandraga Jul 9, 2024
633a96c
New Example - virtual_file_system
hassandraga Jul 9, 2024
3f683ea
Fix GCC Warning
hassandraga Jul 10, 2024
fc0c867
Bridge - Get Bind List After Token
hassandraga Jul 11, 2024
bdd89e2
Core - Send Bind List After Token
hassandraga Jul 11, 2024
708d4a1
Unify Comments
hassandraga Jul 11, 2024
c158487
Fix Invalid Packet Void Response
hassandraga Jul 11, 2024
13f1ebe
Increase Reload Timeout (500ms to 1500ms)
hassandraga Jul 11, 2024
1dbce39
Fix Minor Warnings (is_high_contrast)
hassandraga Jul 11, 2024
8008016
Fix HTTP Header Buffer
hassandraga Jul 11, 2024
d213bf4
Debug Log External File Handler (Header + Body)
hassandraga Jul 11, 2024
fb63521
Fix serve_a_folder (Now should be Header + Body)
hassandraga Jul 11, 2024
0bfe23c
Change WebView to Webview (macOS WebKit Conflict)
hassandraga Jul 11, 2024
17a3a75
Core - Change WebView to Webview (macOS WebKit Conflict)
hassandraga Jul 11, 2024
78a3010
Merge pull request #452 from webui-dev/WebKit-WebView-Conflict-Fix
hassandraga Jul 11, 2024
18f7ce3
Update C++ Examples
hassandraga Jul 11, 2024
ef8595a
Complete C++ Header
hassandraga Jul 11, 2024
64133f4
Fix Clang Warnings
hassandraga Jul 11, 2024
47c11de
Fix macOS Clang Warnings
hassandraga Jul 11, 2024
0826a2c
Fix macOS buffer overlap
hassandraga Jul 12, 2024
9c07d87
Disable Linux WebView in Dynamic Version
hassandraga Jul 12, 2024
a89a101
Bridge - Fix unwanted logs
hassandraga Jul 12, 2024
450197f
Removing Issue Template
hassandraga Jul 12, 2024
ecccc7e
Add comment to webui.js
hassandraga Jul 13, 2024
2e94629
Fix Bridge TypeScript Navigation Release Mode
hassandraga Jul 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# http://webui.me
# https://webui.me
# https://github.com/webui-dev/webui
# Copyright (c) 2020-2023 Hassan Draga.
# Copyright (c) 2020-2024 Hassan Draga.
# Licensed under MIT License.
# All rights reserved.
# Canada.
#
# Special Thanks to Turiiya (https://github.com/ttytm)

Expand All @@ -14,6 +15,10 @@ on:
branches: [main]
paths-ignore: ['**/*.md']

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name == 'main' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
windows:
uses: ./.github/workflows/windows.yml
Expand All @@ -29,3 +34,11 @@ jobs:
uses: ./.github/workflows/linux.yml
permissions:
contents: write

linux_arm:
uses: ./.github/workflows/linux_arm.yml
permissions:
contents: write

zig:
uses: ./.github/workflows/zig.yml
228 changes: 178 additions & 50 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# http://webui.me
# https://webui.me
# https://github.com/webui-dev/webui
# Copyright (c) 2020-2023 Hassan Draga.
# Copyright (c) 2020-2024 Hassan Draga.
# Licensed under MIT License.
# All rights reserved.
# Canada.
#
# Special Thanks to Turiiya (https://github.com/ttytm)

Expand All @@ -14,13 +15,13 @@ jobs:
setup:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Bundle WebUI Bridge
run: |
npm i -g esbuild
chmod +x bridge/build.sh
bridge/build.sh
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: bridge/webui_bridge.h
key: ${{ runner.os }}-${{ github.sha }}-bridge
Expand All @@ -32,77 +33,110 @@ jobs:
contents: write
strategy:
matrix:
compiler: [GCC, Clang]
arch: [x64]
include:
- compiler: GCC
arch: arm64
- compiler: GCC
arch: arm
- cc: gcc
arch: x64
- cc: clang
arch: x64
fail-fast: false
env:
ARTIFACT: webui-linux-${{ matrix.cc }}-${{ matrix.arch }}
CC: ${{ matrix.cc }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache/restore@v3
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: bridge/webui_bridge.h
key: ${{ runner.os }}-${{ github.sha }}-bridge
fail-on-cache-miss: true
- name: Setup Libraries
- name: Setup
run: |
if [ "${{ matrix.compiler }}" == "Clang" ]; then
if [ "$CC" == "clang" ]; then
sudo ln -s llvm-ar-14 /usr/bin/llvm-ar
sudo ln -s llvm-ranlib-14 /usr/bin/llvm-ranlib
elif [ "${{ matrix.arch }}" == "arm64" ]; then
sudo apt install gcc-aarch64-linux-gnu
elif [ "${{ matrix.arch }}" == "arm" ]; then
sudo apt install gcc-arm-linux-gnueabihf
sudo ln -s llvm-strip-14 /usr/bin/llvm-strip
fi
- name: Build Debug Target
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
make CC=aarch64-linux-gnu-gcc debug
elif [ "${{ matrix.arch }}" == "arm" ]; then
make CC=arm-linux-gnueabihf-gcc debug
else
compiler=${{ matrix.compiler }}
make CC=${compiler,,} debug
fi
run: make debug
- name: Build Release Target
if: ${{ !cancelled() }}
run: make
- name: Build TLS Debug Target
run: make WEBUI_USE_TLS=1 debug
- name: Build TLS Release Target
run: make WEBUI_USE_TLS=1
- name: Build Examples
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
make CC=aarch64-linux-gnu-gcc
elif [ "${{ matrix.arch }}" == "arm" ]; then
make CC=arm-linux-gnueabihf-gcc
else
compiler=${{ matrix.compiler }}
make CC=${compiler,,}
fi
examples_base_dir=$(pwd)/examples/C
for example in $(find $examples_base_dir/* -maxdepth 0 -type d); do
echo "> $example"
cd $example || (exit_code=1 && continue)
if ! make; then
echo "Failed to build '$example'"
exit_code=1
continue
fi
if [[ ! -e "main" || ! -e "main-dyn" ]] ; then
echo "Failed to find executable for '$example'" && find .
exit_code=1
continue
fi
done
exit $exit_code
- name: Setup Browser
uses: browser-actions/setup-chrome@v1
- name: Setup Tests
run: |
sudo apt update && sudo apt install xvfb
cd tests
make call_c_from_js.c
make fail_test.c
ls -1
- name: Test Static
timeout-minutes: 2
run: |
cd tests
call_c_from_js=$(pwd)/call_c_from_js
fail_test=$(pwd)/fail_test
xvfb-run "$call_c_from_js"
# Run again and capture its output.
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
- name: Test Dynamic
timeout-minutes: 2
run: |
cd tests
call_c_from_js=$(pwd)/call_c_from_js-dyn
fail_test=$(pwd)/fail_test-dyn
xvfb-run "$call_c_from_js"
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
- name: Prepare Artifact
run: |
cp -r include dist
artifact=webui-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}
# Convert to lowercase (`,,` ^= lowercase shell param)
artifact=${artifact,,}
# Add the ARTIFACT name as GitHub environment variable.
echo "ARTIFACT=$artifact" >> $GITHUB_ENV
mv dist/ $artifact
mv dist/ "$ARTIFACT"
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
- name: Prepare Release
if: github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push')
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
run: |
zip -r ${{ env.ARTIFACT }}.zip ${{ env.ARTIFACT }}
zip -r "$ARTIFACT.zip" "$ARTIFACT"
if [ $GITHUB_REF_TYPE == tag ]; then
echo "TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV
else
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
now=$(date -u +'%Y-%m-%d %H:%M:%S UTC')
echo "TAG=nightly" >> $GITHUB_ENV
echo "BODY=Generated on <samp>$now</samp> from commit ${{ github.sha }}." >> $GITHUB_ENV
echo "TITLE=WebUI Development Build" >> $GITHUB_ENV
{
echo "IS_PRERELEASE=true";
echo "TAG=nightly";
echo "TITLE=WebUI Nightly Build $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
echo "BODY=Generated from commit $GITHUB_SHA."
} >> $GITHUB_ENV
fi
- name: Update Nightly Tag
if: env.IS_PRERELEASE
Expand All @@ -112,7 +146,9 @@ jobs:
with:
tag_name: nightly
- name: Release
if: github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push')
if: >
github.repository_owner == 'webui-dev'
&& (github.ref_type == 'tag' || (github.ref_name == 'main' && github.event_name == 'push'))
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip
Expand All @@ -121,3 +157,95 @@ jobs:
name: ${{ env.TITLE }}
prerelease: ${{ env.IS_PRERELEASE }}
allowUpdates: true

build-ubuntu-24:
needs: setup
runs-on: ubuntu-24.04
permissions:
contents: write
strategy:
matrix:
include:
- cc: gcc
arch: x64
- cc: clang
arch: x64
fail-fast: false
env:
ARTIFACT: webui-linux-${{ matrix.cc }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: bridge/webui_bridge.h
key: ${{ runner.os }}-${{ github.sha }}-bridge
fail-on-cache-miss: true
- name: Setup
run: |
CC="${{ matrix.cc }}"
if [ "$CC" == "clang" ]; then
sudo ln -s llvm-ar-16 /usr/bin/llvm-ar
sudo ln -s llvm-ranlib-16 /usr/bin/llvm-ranlib
sudo ln -s llvm-strip-16 /usr/bin/llvm-strip
else
sudo apt -qq install gcc-14
CC+="-14"
fi
echo "CC=$CC" >> $GITHUB_ENV
- name: Build Debug Target
run: make debug
- name: Build Release Target
if: ${{ !cancelled() }}
run: make
- name: Build TLS Debug Target
run: make WEBUI_USE_TLS=1 debug
- name: Build TLS Release Target
run: make WEBUI_USE_TLS=1
- name: Build Examples
run: |
examples_base_dir=$(pwd)/examples/C
for example in $(find $examples_base_dir/* -maxdepth 0 -type d); do
echo "> $example"
cd $example || (exit_code=1 && continue)
if ! make; then
echo "Failed to build '$example'"
exit_code=1
continue
fi
if [[ ! -e "main" || ! -e "main-dyn" ]] ; then
echo "Failed to find executable for '$example'" && find .
exit_code=1
continue
fi
done
exit $exit_code
- name: Setup Browser
uses: browser-actions/setup-chrome@v1
- name: Setup Tests
run: |
sudo apt update && sudo apt install xvfb
cd tests
make call_c_from_js.c
make fail_test.c
ls -1
- name: Test Static
timeout-minutes: 2
run: |
cd tests
call_c_from_js=$(pwd)/call_c_from_js
fail_test=$(pwd)/fail_test
xvfb-run "$call_c_from_js"
# Run again and capture its output.
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
- name: Test Dynamic
timeout-minutes: 2
run: |
cd tests
call_c_from_js=$(pwd)/call_c_from_js-dyn
fail_test=$(pwd)/fail_test-dyn
xvfb-run "$call_c_from_js"
output=$(xvfb-run --auto-servernum --server-num=1 "$call_c_from_js")
[[ "$output" == *"Hello from the backend!"* ]] && true || exit 1
xvfb-run --auto-servernum --server-num=1 "$fail_test" && exit 1 || true
Loading
Loading