Skip to content

Commit

Permalink
Merge branch 'feature/initial' into 'master'
Browse files Browse the repository at this point in the history
Release v1.0.0

See merge request ctreffs/swift-assimp!1
  • Loading branch information
ctreffs committed Oct 31, 2019
2 parents f46ba77 + 0c03a19 commit e36eb77
Show file tree
Hide file tree
Showing 30 changed files with 665 additions and 341 deletions.
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image: swift:5.0

before_script:
# use the Gitlab CI Job token to login for all git clones on the machine.
- echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
- apt-get update -qq
- apt-get install -y -qq pkg-config libassimp-dev

stages:
- test
- build_release

build_project:
stage: build_release
script:
- swift package reset
- swift build -c release
tags:
- docker
only:
- master

test_project:
stage: test
variables:
GIT_DEPTH: "50"
script:
- swift package reset
- swift test
tags:
- docker
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0.3
100 changes: 100 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
included:
- Sources
excluded:
- docs
- build
- Sources/CImGui
- Sources/Demos
- Tests
- Sources/ImGui/ImGui+Definitions.swift
identifier_name:
excluded:
- id
line_length: 220
number_separator:
minimum_length: 5
opt_in_rules:
#- anyobject_protocol
#- explicit_acl
#- explicit_enum_raw_value
#- explicit_type_interface
#- extension_access_modifier
#- file_header
#- file_name
#- missing_docs
#- multiline_arguments_brackets
#- no_grouping_extension
#- multiline_literal_brackets
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type
- custom_rules
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- explicit_self
- explicit_top_level_acl
- fallthrough
- fatal_error_message
- first_where
- force_unwrapping
- function_default_parameter_at_end
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_parameters
#- multiline_parameters_brackets
- nimble_operator
- no_extension_access_modifier
- number_separator
- object_literal
- operator_usage_whitespace
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefixed_toplevel_constant
- private_action
- private_outlet
- prohibited_interface_builder
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- redundant_nil_coalescing
- redundant_type_annotation
- required_enum_case
- single_test_class
- sorted_first_last
- sorted_imports
- static_operator
- strict_fileprivate
- switch_case_on_newline
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_import
- vertical_parameter_alignment_on_call
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
7 changes: 0 additions & 7 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
os:
- linux
- osx
language: generic
sudo: required
dist: bionic
osx_image: xcode11
addons:
apt:
update: true
packages:
- pkg-config
- libassimp-dev
homebrew:
update: true
packages:
- pkg-config
- assimp
install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"; fi
script:
- swift package reset
- swift build
- swift test
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2019, Christian Treffs
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
lint:
swiftlint autocorrect --format
swiftlint lint --quiet

lintErrorOnly:
@swiftlint lint --quiet | grep error

genLinuxTests:
swift test --generate-linuxmain
swiftlint autocorrect --format --path Tests/

test: genLinuxTests
swift test

submodule:
git submodule update --init --recursive

clean:
swift package reset
rm -rdf .swiftpm/xcode
rm -rdf .build/
rm Package.resolved
rm .DS_Store

cleanArtifacts:
swift package clean

latest:
swift package update

resolve:
swift package resolve

genXcode:
swift package generate-xcodeproj --enable-code-coverage --skip-extra-files

genXcodeOpen: genXcode
open *.xcodeproj

precommit: lint genLinuxTests

testReadme:
markdown-link-check -p -v ./README.md
30 changes: 10 additions & 20 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,17 @@ import PackageDescription
let package = Package(
name: "Assimp",
products: [
.library(
name: "Assimp",
type: .static,
targets: ["Assimp"])
],
dependencies: [
.library(name: "Assimp", targets: ["Assimp"])
],
targets: [
.target(
name: "Assimp",
dependencies: ["CAssimp"]),
.testTarget(
name: "AssimpTests",
dependencies: ["Assimp"]),
.systemLibrary(
name: "CAssimp",
path: "Sources/CAssimp",
pkgConfig: "assimp",
providers: [
.brew(["assimp"]),
.apt(["libassimp-dev"])
])
.target(name: "Assimp", dependencies: ["CAssimp"]),
.testTarget(name: "AssimpTests", dependencies: ["Assimp"]),
.systemLibrary(name: "CAssimp",
path: "Sources/CAssimp",
pkgConfig: "assimp",
providers: [
.brew(["assimp"]),
.apt(["libassimp-dev"])
])
]
)
Loading

0 comments on commit e36eb77

Please sign in to comment.