Skip to content

Commit

Permalink
Merge pull request #8 from signalapp/jrose/merge-swift
Browse files Browse the repository at this point in the history
Merge libsignal-protocol-swift
  • Loading branch information
jrose-signal authored Oct 19, 2020
2 parents c0b6076 + e6e389e commit c3d5f4d
Show file tree
Hide file tree
Showing 35 changed files with 3,018 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ name: Rust
on:
push:
branches: [ master ]
paths-ignore: ['swift']
pull_request:
branches: [ master ]
paths-ignore: ['swift']

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Swift

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build and Test

runs-on: macOS-latest

steps:
- name: Install nightly rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal

- uses: actions/checkout@v2

- name: Build libsignal-ffi
run: cargo build --verbose -p libsignal-ffi

- name: Build Swift and run tests
run: swift test -v --enable-code-coverage
working-directory: swift

- name: Run lint
run: swiftlint lint --reporter github-actions-logging
working-directory: swift

- name: Generate coverage report
run: xcrun llvm-cov show --format=html --instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/*.xctest/Contents/MacOS/* Sources --output-dir coverage-report
working-directory: swift

- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: Coverage
path: swift/coverage-report

- name: Summarize coverage
run: xcrun llvm-cov report --instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata .build/x86_64-apple-macosx/debug/*.xctest/Contents/MacOS/* Sources
working-directory: swift
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.idea
/target
Cargo.lock
/swift/.build

*~
\#*\#
Expand Down
2 changes: 1 addition & 1 deletion rust/bridge/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[lib]
name = "signal_ffi"
crate-type = ["dylib"]
crate-type = ["staticlib"]

[dependencies]
libsignal-protocol-rust = { path = "../../protocol" }
Expand Down
9 changes: 9 additions & 0 deletions swift/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
disabled_rules:
- cyclomatic_complexity
- force_try
- function_body_length
- function_parameter_count
- identifier_name
- line_length
- trailing_comma
- type_body_length
Loading

0 comments on commit c3d5f4d

Please sign in to comment.