Skip to content

Commit

Permalink
update workflow and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
loglund committed Oct 8, 2024
1 parent 224c3c7 commit a8b8c1d
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-waf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Waf Python Tests
jobs:
waf-linux:
container:
image: ghcr.io/steinwurf/waf:latest
image: python:3.12
options: --user 0:0
volumes:
- /home/buildbot/.ssh:/root/.ssh
Expand Down
2 changes: 2 additions & 0 deletions test/add_dependency/app/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ from fake_git import FakeGit
APPNAME = "test_add_dependency"
VERSION = "1.0.0"

NO_RECURSE = False


def resolve(ctx):
# Get the registry and replace the git builder
Expand Down
3 changes: 3 additions & 0 deletions test/add_dependency/libbar/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ APPNAME = "libbar"
VERSION = "1.0.0"


NO_RECURSE = False


def options(opt):
opt.load("compiler_cxx")

Expand Down
3 changes: 3 additions & 0 deletions test/add_dependency/libbaz/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ APPNAME = "libbaz"
VERSION = "1.0.0"


NO_RECURSE = False


def resolve(ctx):
pass

Expand Down
2 changes: 2 additions & 0 deletions test/add_dependency/libextra/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

VERSION = "1.0.0"

NO_RECURSE = False


def build(bld):
bld(export_includes="./src", name="extra")
3 changes: 3 additions & 0 deletions test/add_dependency/libfoo/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
VERSION = "1.0.0"


NO_RECURSE = False


def options(opt):
opts = opt.add_option_group("Foo options")
opts.add_option(
Expand Down
2 changes: 2 additions & 0 deletions test/existing_tag/app/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ from fake_git import FakeGit
APPNAME = "test_add_dependency"
VERSION = "1.0.0"

NO_RECURSE = False


def resolve(ctx):
# Get the registry and replace the git builder
Expand Down
18 changes: 10 additions & 8 deletions test/existing_tag/libbaz/wscript
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
#! /usr/bin/env python
# encoding: utf-8

APPNAME = 'libbaz'
VERSION = '1.0.0'
APPNAME = "libbaz"
VERSION = "1.0.0"


NO_RECURSE = False


def resolve(ctx):
pass


def options(opt):
opt.load('compiler_cxx')
opt.load("compiler_cxx")


def configure(conf):
conf.load('compiler_cxx')
conf.load("compiler_cxx")


def build(bld):
bld.stlib(features='cxx',
target='baz',
source='src/baz/baz.cpp',
export_includes='src')
bld.stlib(
features="cxx", target="baz", source="src/baz/baz.cpp", export_includes="src"
)
7 changes: 5 additions & 2 deletions test/fail_recurse/wscript
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#! /usr/bin/env python
# encoding: utf-8

APPNAME = 'fail_recurse'
VERSION = '1.0.0'
APPNAME = "fail_recurse"
VERSION = "1.0.0"


NO_RECURSE = False


def resolve(ctx):
Expand Down
9 changes: 7 additions & 2 deletions test/fail_recurse/wscript_build_python_error
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#! /usr/bin/env python
# encoding: utf-8

APPNAME = 'foo'
VERSION = '1.0.0'
APPNAME = "foo"
VERSION = "1.0.0"


NO_RECURSE = False


def configure(conf):
pass


def build(conf):
raise RuntimeError("Oh no!")
9 changes: 7 additions & 2 deletions test/fail_recurse/wscript_build_waf_error
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@

import waflib

APPNAME = 'foo'
VERSION = '1.0.0'
APPNAME = "foo"
VERSION = "1.0.0"


NO_RECURSE = False


def configure(conf):
pass


def build(bld):
raise waflib.Errors.WafError("Oh no!")
8 changes: 6 additions & 2 deletions test/fail_recurse/wscript_configure_python_error
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#! /usr/bin/env python
# encoding: utf-8

APPNAME = 'foo'
VERSION = '1.0.0'
APPNAME = "foo"
VERSION = "1.0.0"


NO_RECURSE = False


def configure(conf):
raise RuntimeError("Oh no!")
8 changes: 6 additions & 2 deletions test/fail_recurse/wscript_configure_waf_error
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

import waflib

APPNAME = 'foo'
VERSION = '1.0.0'
APPNAME = "foo"
VERSION = "1.0.0"


NO_RECURSE = False


def configure(conf):
raise waflib.Errors.WafError("Oh no!")
2 changes: 2 additions & 0 deletions test/pull_submodules/app/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ from fake_git import FakeGit
APPNAME = "test_add_dependency"
VERSION = "1.0.0"

NO_RECURSE = False


def resolve(ctx):

Expand Down
17 changes: 9 additions & 8 deletions test/pull_submodules/libbaz/wscript
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#! /usr/bin/env python
# encoding: utf-8

APPNAME = 'libbaz'
VERSION = '1.0.0'
APPNAME = "libbaz"
VERSION = "1.0.0"

NO_RECURSE = False


def resolve(ctx):
pass


def options(opt):
opt.load('compiler_cxx')
opt.load("compiler_cxx")


def configure(conf):
conf.load('compiler_cxx')
conf.load("compiler_cxx")


def build(bld):
bld.stlib(features='cxx',
target='baz',
source='src/baz/baz.cpp',
export_includes='src')
bld.stlib(
features="cxx", target="baz", source="src/baz/baz.cpp", export_includes="src"
)

0 comments on commit a8b8c1d

Please sign in to comment.