0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 12:02:18 +02:00
Commit Graph

97 Commits

Author SHA1 Message Date
Chris Eager
2b0b5119f2
device transfer: replace picky with boring
Upcoming work in `attest` requires additional X509 support, and swapping these libraries 
is a negligible impact on binary size. This uses a fork of `cloudflare/boring`, as
we have some additions that haven’t yet been contributed upstream.
2022-06-16 13:14:17 -07:00
Jordan Rose
41e0a269a7 Node: Test with plain 'mocha' instead of 'electron-mocha'
...which drops our dependency on Electron altogether. We originally
tested with electron-mocha to more closely resemble the Desktop app,
but libsignal-client doesn't actually use anything Electron-specific,
and because it uses N-API we don't have to sync up versions exactly
(and indeed we haven't been updating the Electron in this repo as
often as the Desktop app has taken new Electrons).

Two benefits of this: you can now run the tests on headless systems
(see the change to the CI script), and `yarn install` has less to
download.
2022-04-12 12:50:53 -07:00
Jordan Rose
66c6da4ce1 GitHub: Don't build JNI artifacts in the private repo
We only use them in the public repo; no sense wasting time and space.
2022-04-06 11:50:07 -07:00
Jordan Rose
29998598e3 GitHub: Pin cbindgen version rather than using what's installed 2022-04-04 12:25:33 -07:00
Jordan Rose
93bfcea1ce Build the JNI component of libsignal-server for M1 Macs too 2022-04-04 12:25:33 -07:00
Jordan Rose
0542686e70 Update artifact/package/module names across all three app languages
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
2022-03-23 10:49:09 -07:00
Jordan Rose
1e33d9073d GitHub: Move "Swift Package" CI job to Linux
Pros:

- Linux executors are cheaper on GitHub's CI, when running in the
  private repository.

- Checks that the Swift package can still be built and tested on
  Linux, even though that's not a primary goal.

Cons:

- Removed the code coverage report. It's possible to do this on Linux
  as well, but we haven't been using this as a primary tool, and it's
  still possible to check locally (particularly by running in Xcode).
  The coverage of the Rust tests is more interesting anyway, and we
  haven't had an automated report for *that*.

Neutral:

- Moved the SwiftLint run to the "Swift CocoaPod" job, since SwiftLint
  isn't installed on GitHub's Linux images by default. Even though
  "Swift CocoaPod" is the longest job at the moment and we may want to
  shorten it, the SwiftLint action is quick anyway.
2022-03-17 16:11:43 -07:00
Jordan Rose
d8ab51df1e GitHub: apt-get update for "Publish to NPM" action too 2022-03-11 13:46:36 -08:00
Jordan Rose
633a955a29 GitHub: apt-get update before apt-get install 2022-03-08 15:34:10 -08:00
Dennis Ameling (he/him)
f889089362
NPM: publish releases for Linux arm64 (#450) 2022-02-17 14:31:19 -08:00
Dennis Ameling
a16837fc3e node: Add Windows arm64 prebuilds to CI 2022-01-21 10:50:06 +02:00
Jordan Rose
974b7d22ca GitHub: Move fuzz target checking to the stable Rust toolchain job
...because the fuzz target doesn't have a lockfile, and crates don't
generally support arbitrary nightly versions. See
https://github.com/dtolnay/proc-macro2/issues/307 for an example.
2021-12-10 10:43:47 -08:00
Jordan Rose
3e68ca0d0e GitHub: when testing the NPM package, test the prebuilt N-API module
node-gyp-build should make sure that we don't build the Rust library
*again*, but if we do by accident, the tests should still run against
what we're going to submit, which is what's in the prebuilds/
directory.
2021-12-03 11:49:02 -08:00
Jordan Rose
13af5a5429 Node: Build for M1 Macs too
This requires building on the macOS 11 GitHub runner; the 10.15 runner
isn't set up for cross-compiling when not using Xcode.
2021-12-03 11:47:34 -08:00
Jordan Rose
92564b8711 Fix NPM publishing for move to node/package.json 2021-11-09 10:47:19 -08:00
Jordan Rose
ba8e5b4d61 When publishing to NPM, build against the same Node we tested against
For N-API builds this shouldn't matter, but currently the latest Node
headers don't let us build correctly on Windows, so we need to pin
to *something*.
2021-11-09 10:24:00 -08:00
Jordan Rose
3fd42d7a60 Move package.json inside the node/ directory
Previously all APIs were available through the top-level index.ts, but
now the zkgroup APIs are in their own module. To access that in the
old packaging required writing

    import * from '@signalapp/signal-client/node/dist/zkgroup'

This commit moves the package root into the node/ directory to
eliminate the 'node/' component, then adds a top-level, precompiled
zkgroup.js/.d.ts so that clients can use

    import * from '@signalapp/signal-client/zkgroup'
2021-11-08 16:40:50 -08:00
Jordan Rose
a00cfd1e90 GitHub: When a release is tagged, build and publish JNI artifacts
This will be used to build a "testable" signal-client-java.jar that
includes native libraries for macOS and Windows in addition to Linux.
This is something zkgroup already has; in particular it allows
developers working on the server to use the zkgroup APIs even if they
run macOS or Windows on their individual machines.
2021-11-01 12:53:56 -07:00
Jordan Rose
9a569f2ffe Standardize license headers
...to have a period after "Signal Messenger, LLC."

...except for the Java sources, which still need a cleanup pass.
2021-10-28 17:27:30 -07:00
Jordan Rose
53338501a3 GitHub: update CI branch filters for master -> main change 2021-10-14 15:37:02 -07:00
Jordan Rose
d6fc73b27a Update dependencies
- cargo update
- But stay on our fork of curve25519-dalek (pinned at 3.0.0)
- Update x25519-dalek from 1.0 to 1.1 (instead of 1.2) to stay
  compatible with curve25519-dalek
- Update cpufeatures to 2.1 to match our dependencies
- Note that updating picky* resulted in more duplicate crates (rand*)
- Pin num-bigint-dig to a build that supports Cargo's -Zbuild-std,
  because xargo + autocfg has stopped working with the new toolchain
- Remove xargo in favor of -Zbuild-std
2021-10-06 10:58:44 -07:00
Jordan Rose
78bfc21a32 Bump rust-toolchain to nightly-2021-09-19 (same as zkgroup)
This provides newer armv8 intrinsics, as well as support for the
aarch64-apple-ios-sim target.
2021-10-05 18:01:50 -07:00
Jordan Rose
a1f45b0af2 Add bin/update_versions.py to make it easier to do a release
We were already *reading* all these files (to check that the versions
were in sync); might as well *write* all the files as well.
2021-10-01 16:55:33 -07:00
Jordan Rose
b56f02e8fa Add release instructions (for Signal engineers) 2021-09-30 12:32:15 -07:00
Jordan Rose
093d82115c GitHub: Make sure lockfiles don't get rewritten during testing
Otherwise, we're not testing what we think we're testing.
2021-09-27 14:44:12 -07:00
Graeme Connell
9aa79c0c59 Client-side rust-only HSM enclave library. 2021-09-21 12:07:27 -06:00
Ehren Kret
973f7545b0 Install proper NDK version to fix Java CI 2021-09-13 18:33:46 -05:00
Jordan Rose
e80339c15f protocol: Add a fuzz target that runs interactions between two clients
Based on the fuzzing input, this simulates message sends and receives,
out-of-order delivery, dropped messages, and session resets, solely to
find bugs in happy-path interaction between two clients.
2021-08-13 16:09:04 -07:00
Ruben De Smet
036661b60c
Add rust stable to tests 2021-08-03 11:31:36 +02:00
Jordan Rose
33128d5f45 GitHub: Run Rust tests for a 32-bit platform as well
While Desktop and iOS only support 64-bit platforms, both 32-bit and
64-bit Android are supported.
2021-07-02 10:29:20 -07:00
Nora Trapp
720d796f76 Add support for M1 and Catalyst architectures via cocoapods 2021-06-10 11:34:10 -07:00
Jordan Rose
f33c060f44 GitHub: add more paths that don't need PR testing 2021-05-18 16:01:28 -07:00
Jordan Rose
21f12c9197 GitHub: "Publish to NPM" action should always check out the same ref
Typo fix
2021-05-18 15:56:15 -07:00
Jordan Rose
c570d7fe00 GitHub: when publishing to NPM, allow custom tags (besides "latest") 2021-04-28 10:58:59 -07:00
Jordan Rose
8db505b4f7 GitHub: add a workflow to publish a tag to NPM
And remove the old copy_repo.sh used to generate
libsignal-client-node.
2021-04-28 10:50:27 -07:00
Jordan Rose
f3cece493a PR testing: only verify that Native.d.ts is up to date once 2021-04-28 10:49:58 -07:00
Jordan Rose
a9417bf323 GitHub: add FUNDING.yml to match other public repositories 2021-03-25 18:03:04 -07:00
Jordan Rose
1142c5f43c CI: Add a check for code size growth in the arm64 Android library
Sample output:

    current build is 0% larger than v0.3.4 (current: 1957208 bytes, v0.3.4: 1949016 bytes)
       0.1.5: *********** (1079472 bytes)
       0.1.6: *********** (1153216 bytes)
       0.1.7: *********** (1153216 bytes)
       0.2.0: ************ (1222832 bytes)
       0.2.2: ************* (1267888 bytes)
       0.2.2: ************** (1382592 bytes)
       0.2.3: *************** (1489088 bytes)
       0.3.4: ******************* (1949016 bytes)
     current: ******************* (1957208 bytes)
2021-03-15 18:40:47 -07:00
Jordan Rose
56afeb885c By default, skip Rust tests that take over 10s in debug builds
We'll still run them in CI, but we don't need to run them locally.
2021-03-10 09:54:49 -08:00
Jordan Rose
324f925717
Merge pull request #216 from signalapp/jrose/clippy-tests-fixup
GitHub: Fix Clippy invocation for real
2021-02-22 14:05:51 -08:00
Jordan Rose
9f4880ac8b
Merge pull request #204 from signalapp/jrose/swift-prebuild-rust-library-only
CocoaPods: Build the Rust library as part of installing the CocoaPod
2021-02-22 13:11:14 -08:00
Jordan Rose
9d895b119a GitHub: Fix Clippy invocation for real 2021-02-22 11:31:48 -08:00
Jordan Rose
21875d82f4 Fix or mark-as-allowed Clippy lints in tests
And tweak the GitHub Clippy enforcement so this doesn't regress.
2021-02-22 09:46:25 -08:00
Jordan Rose
cca1eccc17 GitHub: Fix output for duplicate dependency checking 2021-02-19 10:49:20 -08:00
Jordan Rose
319d20993b GitHub: install iOS device target for pod lib lint testing
This will run the prepare_command specified by the podspec, which
means it will try to build both simulator and device versions of
libsignal-ffi. This also means we don't need the separate "Build Rust
for iOS" test.
2021-02-18 17:02:32 -08:00
Jordan Rose
bfff69c962 Revert "Merge pull request #163 from signalapp/jrose/cocoapods-binary-compat"
This reverts commit 55a6ae7c83, reversing
changes made to 04202b28fd.
2021-02-18 15:56:07 -08:00
Dennis Ameling
5bfbe24c2d Fix typo in Actions workflow 2021-02-13 01:51:52 +01:00
Dennis Ameling
0042e0d60c Add Node multi-arch support 2021-02-13 01:45:37 +01:00
Jack Lloyd
4689606d63 Add a script to verify the crate and package versions match 2021-02-10 13:10:13 -05:00
Jordan Rose
afe2c3029e
Merge pull request #183 from signalapp/jrose/fix-duplicate-crate-checking
Fix our duplicate crate checking, then resolve duplicate crates
2021-02-05 09:56:06 -08:00