-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge with upstream/main + minor bug fixes
- Loading branch information
Showing
57 changed files
with
300 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
name: "webassembly" | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mymindstorm/setup-emsdk@v13 | ||
with: | ||
version: 3.1.37 | ||
- uses: actions/checkout@v3 | ||
- name: Install Qt native version (required by webassembly version) | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
aqtversion: '==3.1.*' | ||
version: '6.6.1' | ||
host: linux | ||
target: 'desktop' | ||
arch: gcc_64 | ||
dir: '${{github.workspace}}/qt' | ||
install-deps: 'true' | ||
modules: 'qtcharts qtpositioning' | ||
|
||
- name: Set QT_HOST_PATH | ||
run: echo "QT_HOST_PATH=${Qt6_DIR}" >> "$GITHUB_ENV" | ||
|
||
- name: Install Linux Dependencies | ||
run: sudo apt-get install -y build-essential ninja-build | ||
|
||
- name: Install Qt Webassembly version | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
aqtversion: '==3.1.*' | ||
version: '6.6.1' | ||
host: linux | ||
target: 'desktop' | ||
arch: wasm_singlethread | ||
dir: '${{github.workspace}}/qt' | ||
install-deps: 'true' | ||
modules: 'qtcharts' | ||
|
||
- name: Make qt webassembly binaries executable | ||
run: | | ||
chmod u+x ${Qt6_DIR}/bin/* | ||
- name: Verify emcc | ||
run: emcc -v | ||
|
||
- name: Set reusable strings | ||
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | ||
echo "install-dir=${{ github.workspace }}/install" >> "$GITHUB_OUTPUT" | ||
- name: Configure CMake | ||
env: | ||
CMAKE_PREFIX_PATH: ${{env.Qt6_DIR}}/lib/cmake | ||
run: > | ||
${Qt6_DIR}/bin/qt-cmake | ||
-G Ninja | ||
-B ${{ steps.strings.outputs.build-output-dir }} | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DALP_WWW_INSTALL_DIR=${{ steps.strings.outputs.install-dir }} | ||
-DALP_ENABLE_ADDRESS_SANITIZER=ON | ||
-DALP_ENABLE_ASSERTS=ON | ||
-DFMT_INSTALL=OFF | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target install | ||
|
||
- name: Create artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: webassembly_out | ||
path: ${{ steps.strings.outputs.install-dir }} | ||
if-no-files-found: error | ||
|
||
- name: Create index.html | ||
run: | | ||
echo "<html>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <head>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <title>AlpineMaps build</title>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " </head>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <body>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <ul>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <li><a href="./alpineapp.html">AlpineMaps App</li>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <li><a href="./plain_renderer.html">plain renderer</li>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <li><a href="./unittests_radix.html">unittests_radix</li>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <li><a href="./unittests_nucleus.html">unittests_nucleus</li>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " <li><a href="./unittests_gl_engine.html">unittests_gl_engine</li>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " </ul>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo " </body>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo "</html>" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
echo "" >> ${{ steps.strings.outputs.install-dir }}/index.html | ||
- name: Create Pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ${{ steps.strings.outputs.install-dir }} | ||
|
||
- name: Debug output | ||
run: echo ${{ github.event_name }} | ||
|
||
deploy: | ||
if: github.event_name == 'push' | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
- name: Debug output | ||
run: echo ${{ steps.deployment.outputs.page_url }} |
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
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
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.