Skip to content

Commit

Permalink
Merge pull request #3 from ctreffs/feature/fix-ci
Browse files Browse the repository at this point in the history
Fix ci
  • Loading branch information
ctreffs authored Jan 13, 2020
2 parents ec69bec + 64eb584 commit e953ab1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
31 changes: 10 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode11
language: swift
jobs:
include:
- os: linux
dist: bionic
language: generic
- os: osx
osx_image: xcode11.3
language: swift
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
script:
- swift package reset
- swift build
- swift test
env:
- BADGE=linux
- BADGE=osx
# hack to get some OS-specific badges
# see: https://github.com/travis-ci/travis-ci/issues/9579
matrix:
exclude:
- os: linux
env: BADGE=osx
- os: osx
env: BADGE=linux
- make runCI
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ buildCImGui: updateCLibImGui generateCInterface copyLibImGui
buildAutoWrapper:
swift build -c release --product AutoWrapper

buildRelease:
swift build -c release -Xcxx -Wno-modules-import-nested-redundant -Xcxx -Wno-return-type-c-linkage

runCI:
swift package reset
swift build -c release -Xcxx -Wno-modules-import-nested-redundant -Xcxx -Wno-return-type-c-linkage -Xcc -Wno-modules-import-nested-redundant -Xcc -Wno-return-type-c-linkage
swift test -Xcxx -Wno-modules-import-nested-redundant -Xcxx -Wno-return-type-c-linkage -Xcc -Wno-modules-import-nested-redundant -Xcc -Wno-return-type-c-linkage

wrapLibImGui: buildAutoWrapper
$(release_dir)/AutoWrapper $(imgui_src)/generator/output/definitions.json $(swift_imgui_src)/ImGui+Definitions.swift

Expand Down
8 changes: 5 additions & 3 deletions Tests/ImGuiTests/ImGuiTests.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import ImGui
import XCTest

public final class ImGuiTests: XCTestCase {
func testVersion() {
final class ImGuiTests: XCTestCase {
func testImGuiVersion() {
XCTAssertNotNil(ImGuiGetVersion())
XCTAssertEqual(ImGuiGetVersion(), "1.74 WIP")
IMGUI_CHECKVERSION()
}

func testCreateContext() {
XCTAssertNotNil(ImGuiCreateContext(nil))
ImGuiDestroyContext(ImGuiGetCurrentContext())
}

func testGetIO() {
XCTAssertNotNil(ImGuiCreateContext(nil))
XCTAssertNotNil(ImGuiGetIO())
ImGuiDestroyContext(ImGuiGetCurrentContext())
}
}
2 changes: 1 addition & 1 deletion Tests/ImGuiTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extension ImGuiTests {
static let __allTests__ImGuiTests = [
("testCreateContext", testCreateContext),
("testGetIO", testGetIO),
("testVersion", testVersion)
("testImGuiVersion", testImGuiVersion)
]
}

Expand Down

0 comments on commit e953ab1

Please sign in to comment.