Skip to content

Commit 6f9cf5f

Browse files
authored
Added initial CI for building all examples (#36)
1 parent aaab5db commit 6f9cf5f

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

.github/workflows/main.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
jobs:
17+
test:
18+
strategy:
19+
matrix:
20+
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
21+
nim: ['devel', 'version-1-6', 'version-1-4', 'version-1-2']
22+
23+
name: Nim ${{ matrix.nim }} on ${{ matrix.os }}
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: alaviss/setup-nim@0.1.1
28+
with:
29+
path: 'nim'
30+
version: ${{ matrix.nim }}
31+
- run: nimble buildExamples

nimqml.nimble

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1-
[Package]
2-
name = "nimqml"
1+
# Package
2+
33
version = "0.9.0"
44
author = "Filippo Cucchetto"
55
description = "QML bindings for Nim"
66
license = "LGPLv3"
77
srcDir = "src"
88

9-
[Deps]
10-
Requires: "nim >= 1.2.0"
9+
# Deps
10+
11+
requires "nim >= 1.2.0"
12+
13+
14+
task buildExamples, "Build examples":
15+
exec "nim c examples/helloworld/main"
16+
exec "nim c examples/abstractitemmodel/main"
17+
exec "nim c examples/charts/main"
18+
exec "nim c examples/connections/main"
19+
exec "nim c examples/contactapp/main"
20+
exec "nim c examples/helloworld/main"
21+
exec "nim c examples/qmlregistertype/main"
22+
exec "nim c examples/resourcebundling/main"
23+
exec "nim c examples/simpledata/main"
24+
exec "nim c examples/slotsandproperties/main"

0 commit comments

Comments
 (0)