Skip to content

Commit 6d9d4e1

Browse files
committed
ci
1 parent 6e2438c commit 6d9d4e1

File tree

3 files changed

+67
-3
lines changed

3 files changed

+67
-3
lines changed

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on: push
4+
jobs:
5+
build:
6+
if: |
7+
!contains(github.event.head_commit.message, '[skip ci]')
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
nim-channel: [devel]
12+
13+
name: ${{ matrix.nim-channel }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup nim
19+
uses: jiro4989/setup-nim-action@v2
20+
with:
21+
nim-version: ${{ matrix.nim-channel }}
22+
23+
- name: Test
24+
shell: bash
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install gcc-multilib # Support for 32bits
28+
clang --version
29+
# For some reason wasm-ld is not in PATH, so add it. llvm version should probably match that of clang
30+
export PATH=$PATH:/usr/lib/llvm-11/bin
31+
32+
nim --version
33+
nimble install -dy
34+
mkdir _site
35+
cd tests
36+
nake wasm -d:release
37+
38+
mv build/wasm/main.html ../_site/demo.html
39+
40+
- name: Upload Pages artifact
41+
uses: actions/upload-pages-artifact@v3
42+
43+
# Deploy job
44+
deploy:
45+
# Add a dependency to the build job
46+
needs: build
47+
if: github.ref == 'refs/heads/main'
48+
49+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
50+
permissions:
51+
pages: write # to deploy to Pages
52+
id-token: write # to verify the deployment originates from an appropriate source
53+
54+
# Deploy to the github-pages environment
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
59+
# Specify runner + deployment step
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4 # or the latest "vX.X.X" version tag for this action

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# nimx [![Build Status](https://travis-ci.org/yglukhov/nimx.svg?branch=master)](https://travis-ci.org/yglukhov/nimx) [![nimble](https://img.shields.io/badge/nimble-black?logo=nim&style=flat&labelColor=171921&color=%23f3d400)](https://nimble.directory/pkg/nimx)
1+
# nimx [![Build Status](https://github.com/yglukhov/nimx/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/yglukhov/nimx/actions?query=branch%3Amain) [![nimble](https://img.shields.io/badge/nimble-black?logo=nim&style=flat&labelColor=171921&color=%23f3d400)](https://nimble.directory/pkg/nimx)
22

33
Cross-platform GUI framework in [Nim](https://github.com/nim-lang/nim).
44
This is a development (version 2) version, a lot of upcoming breaking changes are expected.
55
For the old version see `v1` branch.
66

7-
[Live demo in WebGL](http://yglukhov.github.io/nimx/livedemo/main.html)
7+
[Live demo in WebGL](http://yglukhov.github.io/nimx/demo.html)
88

99
![Sample Screenshot](./doc/sample-screenshot.png)
1010

nimx/naketools.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ proc build*(b: Builder) =
761761
b.emscriptenPreloadFiles.add(b.originalResourcePath & "/OpenSans-Regular.ttf@/res/OpenSans-Regular.ttf")
762762
b.executablePath = b.buildRoot / "main.wasm"
763763
b.nimFlags.add(["--cpu:wasm32", "-d:wasm", "--os:linux", "--cc:clang", "--threads:off", "--mm:arc",
764-
"-d:noSignalHandler", "--exceptions:goto"])
764+
"-d:noSignalHandler", "--exceptions:goto", "--clang.options.linker=", "--clang.cpp.options.linker="])
765765

766766
when defined(macosx):
767767
let clang = "/opt/homebrew/opt/llvm/bin"

0 commit comments

Comments
 (0)