-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from silicon-heaven/ci-add-wasm
CI: Multiple improvements
- Loading branch information
Showing
45 changed files
with
245 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,9 @@ inputs: | |
qt_version: | ||
description: "Specify Qt version to use" | ||
required: true | ||
default: "6.5.3" | ||
qt_arch: | ||
description: "Specify Qt version to use" | ||
description: "Specify Qt arch to use" | ||
default: "gcc_64" | ||
use_qt6: | ||
description: "Specify whether we're using Qt 5 or Qt 6" | ||
|
@@ -21,9 +22,9 @@ runs: | |
using: "composite" | ||
steps: | ||
# Linux deps | ||
- name: Install/cache clazy, ninja, openldap, doctest libfuse, and Qt's dependencies | ||
- name: Install apt packages | ||
if: runner.os != 'Windows' | ||
uses: awalsh128/cache-apt-pkgs-action@v1.3.0 | ||
uses: awalsh128/cache-apt-pkgs-action@v1.4.2 | ||
with: | ||
packages: ninja-build libgl1-mesa-dev libpulse-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-util1 libxcb-xinerama0 libxkbcommon-x11-0 libxcb-cursor-dev clazy libfuse-dev | ||
version: 1.0 | ||
|
@@ -45,6 +46,15 @@ runs: | |
arch: ${{ inputs.qt_arch }} | ||
install-deps: false | ||
modules: ${{ inputs.modules }} | ||
extra: --autodesktop | ||
|
||
- name: WASM-specific stuff | ||
if: inputs.qt_arch == 'wasm_singlethread' | ||
run: | | ||
chmod +x "${Qt6_DIR}/bin/qt-cmake" | ||
echo cmake_extra_args="'-DBUILD_SHARED_LIBS=OFF' '-DQT_HOST_PATH=$(realpath "${Qt6_DIR}/../gcc_64")'" >> "$GITHUB_ENV" | ||
echo CMAKE_BIN="${Qt6_DIR}/bin/qt-cmake" >> "$GITHUB_ENV" | ||
shell: bash | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
|
@@ -55,15 +65,15 @@ runs: | |
run: | | ||
CFLAGS="-Werror ${CFLAGS}" \ | ||
CXXFLAGS="-Werror ${CXXFLAGS}" \ | ||
cmake \ | ||
-S '${{github.workspace}}' \ | ||
-B '${{github.workspace}}/build' \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_TESTING=OFF \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
-DSHVSPY_USE_QT6=${{ inputs.use_qt6 }} \ | ||
${{ env.cmake_extra_args }} \ | ||
${{ inputs.additional_cmake_args }} | ||
"${CMAKE_BIN:-cmake}" \ | ||
-S '${{github.workspace}}' \ | ||
-B '${{github.workspace}}/build' \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_TESTING=OFF \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
-DSHVSPY_USE_QT6=${{ inputs.use_qt6 }} \ | ||
${{ env.cmake_extra_args }} \ | ||
${{ inputs.additional_cmake_args }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: WebAssembly | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
env: | ||
emsdk_cache_dir: "emsdk-cache" | ||
|
||
jobs: | ||
ubuntu-qt6-wasm: | ||
name: Qt 6.6.3 / Ubuntu 22.04 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Clone the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup emsdk cache | ||
uses: actions/cache@v4 | ||
with: | ||
key: emsdk-cache | ||
path: ${{ env.emsdk_cache_dir }} | ||
|
||
- uses: mymindstorm/setup-emsdk@v14 | ||
with: | ||
version: 3.1.37 | ||
actions-cache-folder: ${{ env.emsdk_cache_dir }} | ||
|
||
- name: Setup CMake | ||
uses: ./.github/actions/cmake | ||
with: | ||
qt_version: 6.6.3 | ||
qt_arch: wasm_singlethread | ||
use_qt6: ON | ||
modules: qtwebsockets | ||
|
||
- name: Build | ||
run: cmake --build '${{github.workspace}}/build' --parallel "$(nproc)" | ||
shell: bash | ||
|
||
- name: Consolidate WebAssembly artifacts | ||
run: | | ||
mkdir gh-sources | ||
cp '${{github.workspace}}'/build/shvspy/*.{js,wasm,html} gh-sources/ | ||
mv gh-sources/shvspy.html gh-sources/index.html | ||
cp '${{github.workspace}}'/distro/shvspy.AppDir/shvspy.svg gh-sources/qtlogo.svg | ||
shell: bash | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'gh-sources/' | ||
|
||
- name: Deploy to GitHub Pages | ||
if: github.ref == 'refs/heads/master' | ||
uses: actions/deploy-pages@v4 |
Submodule libshv
updated
23 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.