Commit Graph

188 Commits

Author SHA1 Message Date
Icaro Motta 0f71c18f57
Disable fn-deprecated warning during development (#17204)
Disable :fn-deprecated warnings from the Closure compiler for the mobile
shadow-cljs target during development. The compiler warnings are no longer
necessary, because we're managing deprecation via clj-kondo.

Without the compiler setting's change, every code reload will generate warnings
for each and every deprecated call in the repo, which can quickly grow to the
hundreds or more, thus making the terminal output horrendous to understand.

Also set clj-kondo's "fail-level" to "error" (the default is "warning").
2023-09-06 08:58:42 -03:00
Siddarth Kumar 7ca17e537e
chore: improve `make show-ios-devices` (#17180)
This commit removes the dependency of the IOS Target for `show-ios-devices` command.
We no longer need the IOS target because the default shell contains the `ios-deploy` library, which is used by this command already.
2023-09-05 14:55:25 +05:30
Anton Iakimov ebd38295c6
run-android: set build abis depending on connected devices abis 2023-08-31 13:01:24 +02:00
Anton Iakimov d5c1ecc104
nix: switch status-im config to env vars, cleanup
To help with #15595 changes, refactoring is required.
In this PR we switch from config to env vars.
Doing some cleanup meanwhile.
2023-08-07 14:50:36 +02:00
Icaro Motta 19ca8e28a5
Lint and fix missing trailing newlines (#16445)
Apply the Clojure Style Guide recommendation to end files with proper lines
(having a trailing newline character). See
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
2023-07-04 19:40:13 +00:00
Anton Iakimov 43ef6db7b9
js: remove unused visual tests and detox package #16372
After the nixpkgs upgrade we started to have Xcode command line tools installation popup on each make test, dtrace-provider was failing meanwhile: #16356

It appeared, that it was failing before the upgrade with different issue: #16356

dtrace-provider is a dependency for detox, which was added for visiual tests in #14329
These tests don't run.

This build issues didn't cause any problems, because it was not obligatary.
See NODE_DTRACE_PROVIDER_REQUIRE option, which can enforce this requirement.

See #16356 for more details.

In this PR we disable detox dependency for now.
And also Visual Tests.
2023-06-26 11:59:15 +02:00
Jakub Sokołowski 6f8dc27282
nix: fix applying nix.conf by using correct env var
According to this line from the docs:

>The system-wide configuration file sysconfdir/nix/nix.conf (i.e. /etc/nix/nix.conf),
>or $NIX_CONF_DIR/nix.conf if NIX_CONF_DIR is set. Values loaded in this file are not
>forwarded to the Nix daemon. The client assumes that the daemon has already loaded them.

https://nixos.org/manual/nix/stable/command-ref/conf-file.html#description

Our usage of `NIX_CONF_DIR` has been wrong for a while now.
The correct way of applying this config is using `NIX_USER_CONF_FILES`.

In addition the `extra-substituters` no longer exists in the docs.
Use of `trusted-substituters` is necessary according to:

>At least one of the following conditions must be met for Nix to use a substituter:
>
>- the substituter is in the trusted-substituters list
>- the user calling Nix is in the trusted-users list

https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-substituters

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-20 13:55:07 +02:00
Jakub Sokołowski fa59843804
tests: fix type of shell used for linting
Otherwise Node modules are not installed.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-20 12:20:54 +02:00
Rahul Pratap c80992b6bf
Update prettier config for the project. (#16303)
* Update prettier config for the project.

* Add prettier to make lint-fix.
2023-06-19 19:09:12 +05:30
Jakub Sokołowski 93cf54919f
nix: add upgrade script for Nix interpreter
Now developers can upgrade to current Nix version using just:
```sh
make nix-upgrade
```
For manual instructions see:
https://nixos.org/manual/nix/stable/installation/upgrading.html

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-19 12:21:00 +02:00
Mohamed Javid 42040e4fc9
Update default iOS Simulator (#16289)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-06-15 23:37:11 +05:30
Jakub Sokołowski 58d20967ae
nix: use jsbundle derivation for iOS as well
For some unknown to me reason we are using a different Yarn call to
Shadow-cljs to generate the JSBundle for iOS builds, while the one
created by the Android derivation shoudl be exactly the same.

I'm changing the target to just be `make jsbundle` while keeping aliases
referencing old naming, and moving things around in `nix` folder to
reflect the fact that the derivation is no longer Android-specific.

Also, crucially, I've changed the `import` in `index.js` to use the
`./result/index.js` path, since that's what Nix creates. I'm not sure if
this clashes with any developer workflow that takes place locally, so
I'd appreciate some testing from developers.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/67

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-22 10:31:09 +02:00
Siddarth Kumar 46351543f1
Allow running debug iOS builds on physical device via CLI and Enable Automatic code signing for Debug builds (#15637)
This commit does the following :

- Adds a command in makefile to show connected iOS devices via make `show-ios-devices`
- Developers can then copy their connected iPhone's Device Name and use it to deploy debug builds
on the device by `make run-ios-device DEVICE_NAME="their-device-name"`
- Enables automatic code signing ( only for Debug scheme )
2023-04-19 16:20:26 +05:30
yqrashawn 46896ff7f4
ci: add component test (#15071) 2023-02-21 13:42:33 +08:00
Jamie Caprani 967c869486
chore: fix component tests and permission drawer preview (#14831) 2023-01-19 15:03:53 -08:00
Andrea Maria Piana 64ec49c9c4
Removed removed files and add untracked from linting
The linter would fail if there were removed files, as it would
try to lint them but would not find them.
Similarly, untracked files would not be linted.

This commit changes the behavior so that untracked files are linted and
removed files are ignored, that way we can run it before committing if
there are unstaged changes that include removed/untracked files.
2023-01-13 17:22:13 +00:00
Jakub Sokołowski 0623355e84
fleets.json: drop decomissioned eth.test fleet
The fleet wasn't being used so it has been liquidated:
https://github.com/status-im/infra-eth-cluster/commit/de986014

Signed-off-by: Jakub Sokołowski <jakub@status.im>

make sure that "waku-nodes" is not pulled from fleets.json
2023-01-12 13:15:13 +01:00
Parvesh Monu 115fb3f590
fix default shell for -include targets (#14738) 2023-01-10 18:36:38 +05:30
yqrashawn 4ce71e4d29
refactor: fix make lint and reformat (#14653) 2022-12-28 15:47:55 +08:00
yqrashawn 9ded8bfe97
chore: tweak zprint conf (#14645) 2022-12-28 10:05:24 +08:00
yqrashawn 39e29cfb5a
feat: replace clj-fmt with zprint (#14520) 2022-12-20 21:57:49 +08:00
Icaro Motta 8cf95cdb30
New make target to run tests via REPL (#14576) 2022-12-20 09:07:00 -03:00
Omar Basem ba41d4b271
Photo Selector 2 (#14487)
* Photo Selector (2)
2022-12-20 07:36:06 +04:00
Jamie Caprani 9de4417f03
chore: update nix config to reference babel.config.js file (#14436)
* chore: update nix config to reference babel.config.js file

* chore: update component test make command
2022-11-24 13:05:58 -08:00
Jamie Caprani c6e8aad745
feat: add component tests using react-testing-library and jest (#14331) 2022-11-23 05:59:18 -08:00
Jamie Caprani 72d43ba745
Visual tests setup (#14329)
feat: configuration setup for visual tests

Co-authored-by: Erik Seppanen <esep@protonmail.com>
2022-11-20 15:46:04 -08:00
yqrashawn 3925de58b1
chore: lint against re-frame dispatch/subscribe in quo components (#14282) 2022-11-10 10:22:42 +08:00
Omar Basem c423aa7970
Unpin messages (#14204)
* feat: pinned messages new ui
2022-10-26 17:18:50 +04:00
Icaro Motta 5d775d93fa
Use native binary for the clj-kondo linter (#14179) 2022-10-19 09:54:01 -03:00
Jakub Sokołowski d6a8f912ea
nix: upgrade nixpkgs to latest nixos-unstable
Notable upgrades:

* Go `1.17.11` to `1.18.6`
* NodeJS `16.15.0` to `16.17.1`
* Clojure `1.11.1.1139` to `1.11.1.1165`
* Ruby Gem `3.2.26` to `3.3.20`
* Bundler `2.3.9` to `2.3.22`
* Git `2.36.1` to `2.37.3`
* Curl `7.83.1` to `7.85.0`
* OpenSSL `1.1.1o` to `3.0.5`
* PatchELF `0.14.5` to `0.15.0`
* Android SDK Platform Tools `33.0.1` to `33.0.2`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-10-12 11:07:57 +02:00
Jakub Sokołowski bcf919fcbb
nix: use android-sdk shell for fdroid-pr target
Also renamed `android-env` shell to `android-sdk` to be more descriptive.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-29 12:54:47 +02:00
Icaro Motta afbdb4c0b4
[#13964 #13962] Display contact requests (#14014) 2022-09-19 11:08:21 -03:00
Jakub Sokołowski 5df202753f
drop unused coveralls configuration and CI steps
Depends on: https://github.com/status-im/status-jenkins-lib/pull/45

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-26 21:37:59 +02:00
Jakub Sokołowski 0a4d181477
ci: extrac Lint and Tests to separate job
This way we can make PRs depend only on successful tests, and not whole
builds for all platforms, which take 10 minutes or more.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-26 15:47:32 +02:00
Jakub Sokołowski 1f7fd17ff1
rename status-react to status-mobile
This way the name of the repo makes at least some sense and
matches the `status-desktop` repo naming.

Also updated `status-jenkins-lib` since it also contained
references to `status-react` repo and job names.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-17 14:46:16 +02:00
Andrea Maria Piana 9bcbb580e1
Add login integration test
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-06-08 13:43:32 +01:00
Jakub Sokołowski e2fabd2386
makefile: use default nix shell for building android
Otherwise `watchman` utility is unavailable for MacOS.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-31 12:03:21 +02:00
Andrea Maria Piana e4cba0f663
Add status-go tests
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-05-25 17:59:02 +01:00
Jakub Sokołowski acfa73ab43
nix: build unsigned Android APK, sign separately
This has several benefits:

* Less abuse of `extra-sandbox-paths` Nix option
* Less inputs to the Android release build derivation
* Easier for users to sign the build themselves
* Simplification of `scripts/release-android.sh`
* Preparation for building using Nix Flakes

The only two remaining credentials passed via `extra-sandbox-paths` is
the Infura and OpenSea API keys, and there is no way around that other
than passing them via Nix arguments, but that would cause them to end up
in `/nix/store` as part of `.drv` files.

I'm also renaming `release-fdroid` to `build-fdroid` to be consistent.

Depends on: https://github.com/status-im/status-jenkins-lib/pull/42

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-21 11:10:11 +02:00
andrey f39b688e89
google free and metrics free
Signed-off-by: andrey <motor4ik@gmail.com>
2022-05-19 07:22:23 +02:00
Audrius Molis 8e85d15a86
Only create git hook whet it is absent
Signed-off-by: Audrius Molis <masta@dr.com>
2022-03-14 11:57:14 +02:00
Audrius Molis 1eb956d562
Add changelog from status-go on upgrade #13090
Signed-off-by: Audrius Molis <masta@dr.com>
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-03-07 12:46:49 +01:00
Parvesh Monu 36c7d8e4ca
Implementation of remote android notifications (#13028) 2022-02-14 17:27:33 +05:30
Jakub Sokołowski 179f1d26ae
nix: remove obsolete references to Nimbus sources
This used to be a project to integrate Nimbus with mobile, but it was abandoned.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-15 13:17:30 +01:00
Jakub 9b5cbf8258
nix: avoid nesting of Nix shells, show errors (#12796)
Nesting of Nix shells does not work, since we have no way to safely do
that without starting an infinite loop of nested Nix shells.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-05 12:59:33 +00:00
Andrea Maria Piana 5c52854d11
fdroid: add script that automates submissions
This script fetches a specified APK and analyzes it for values like
version code or commit and then based on that creates a branchy and a
commit in `fdroiddata` repository that can be used to create a release PR.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-10-13 12:13:38 +02:00
Jakub Sokołowski bcd497a48a
fdroid: fix adding GOOGLE_FREE=1 with missing newline
Broke removing Google dependencies for F-Droid builds:
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/9730#note_674501441

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-10 17:39:28 +02:00
Jakub Sokołowski 0e12360ed8
fdroid: fix permissions on TMPDIR for Vagrant builds
Our `Makefile` implicitly creates the `TMPDIR` folder.
The issue with that is that if `make fdroid-build-env` is called by
`root` - as it is when being used by F-Droid - then the `TMPDIR`
is also owned by `root`, and because its permissions are `0755` the
`vagrant` user is unable to write to it.

This is why implicit targets like this are a nightmare to debug:
63290fd019/Makefile (L120-L124)

For more details see:
https://gitlab.com/fdroid/fdroidserver/-/issues/910
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/8879
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/9140

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-10 16:43:07 +02:00
Jakub Sokołowski ffb5fac6f7
fdroid: add fix for /tmp permission on Vagrant builders
You can see details about this in these PRs:
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/8879
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/9140

Without this the build fails with:
```
error: creating directory '/tmp/tmp-status-react-896b583da/nix-shell-900-0': Permission denied
```
https://monitor.f-droid.org/builds/log/im.status.ethereum/2021042608

It doesn't make any sense to me, since `/tmp` has to have `1777`
permissions, but it is what it is.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-08 10:13:40 +02:00
Roman Volosovskyi ba3e229d6f
make target for clearing xcode's derived data dir 2021-05-12 16:39:29 +03:00