Commit Graph

18 Commits

Author SHA1 Message Date
Evan Hahn
84ebba40a2 CI: only run precommit script for pull requests
According to [GitHub's docs][0], the `github.base_ref` property "is only
available when the event that triggers a workflow run is either
`pull_request` or `pull_request_target`.

Because of this, pushes were running the following command...

    python3 Scripts/precommit.py --ref origin/

...and getting this error:

    fatal: ambiguous argument 'origin/': unknown revision or path not in the working tree.

This has been broken for a long time, but it didn't cause CI to fail until
d7c33eb211.

After some discussion, we decided not to run these on pushes to `master`
or `release/*`.

(See also: [this GitHub issue][1] which asks for clarification.)

[0]: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
[1]: https://github.com/github/docs/issues/13810
2022-04-04 09:57:24 -05:00
Jordan Rose
7ca12f9885 CI: Remove Rust install step
LibSignalClient is no longer compiled on demand, so we don't need Rust
to build and test the iOS app.
2022-03-29 10:17:30 -07:00
Chris Eager
113c293232 Update rust working directory in GitHub Action 2022-03-28 13:19:38 -07:00
Evan Hahn
1101db6a29 Upgrade scripts to Python 3
Python 2 was [removed from macOS in 12.3][0]. This change:

- Automatically converts many files with [2to3][1]
- Manually updates all [shebangs][2] to use `python3` instead of
  versionless `python` or `python2.7`
- Manually applies a few fixes, many of which were noted by 2to3
- Manually undoes a few fixes that were automatically done by 2to3

[0]: https://www.macrumors.com/2022/01/28/apple-removing-python-2-in-macos-12-3/
[1]: https://docs.python.org/3/library/2to3.html
[2]: https://en.wikipedia.org/wiki/Shebang_(Unix)
2022-03-21 12:58:33 -05:00
Jordan Rose
5a050b914c CI: Upload build logs on failure 2022-02-02 16:06:38 -08:00
Jordan Rose
363da96482 CI: Check out submodules through GitHub, which is faster 2022-01-27 15:56:56 -08:00
Michelle Linington
3b6fa704f1 Three part version numbers need lexicographic ordering 2021-10-04 09:53:36 -03:00
Michelle Linington
686375c447 Add CI phase to select a minimum Xcode version
This change uses a throwing computed variable which was added in Swift
5.5 and requires Xcode 13 to compile.

The default Xcode on current macOS 11 image is still 12.5.1 and won't be
updated until later this month. The newer Xcode is available on these
machines, but until October 18th we need to select it manually.
https://github.com/actions/virtual-environments/issues/4180
2021-10-04 09:53:36 -03:00
Nora Trapp
7361da63d1 Fix github actions 2021-08-18 16:40:05 -07:00
Ewout ter Hoeven
5af19751d7 CI: Use ruby/setup-ruby step with .ruby-version
- Replaces the actions/setup-ruby step, which is deprecated, with the ruby/setup-ruby step
 - Uses the Ruby version from the .ruby-version file
2021-08-18 15:28:54 -07:00
Nora Trapp
e0d3d455bf Update CI to macOS 11 2021-06-16 11:36:09 -07:00
Ewout ter Hoeven
24a7dc7755 CI: Run on pushes to master and release branches 2021-02-12 12:12:27 -08:00
Nora Trapp
4566549c21 Don't install swiftlint, it's built in now 2021-02-12 12:12:27 -08:00
Jordan Rose
65da248b06 GitHub: install iOS target for Rust (using the correct toolchain) 2021-01-28 12:03:49 -08:00
Jordan Rose
944e44c074 GitHub: Speed up checking out a repository when linting
We only need two commits: the merge commit and the base ref.
2020-10-23 16:01:18 -07:00
Jordan Rose
a96afb8d33 GitHub: Clarify linting error to refer to precommit.py
...instead of just clang-format, since precommit.py does other linting
as well.
2020-09-30 11:32:17 -07:00
Nora Trapp
f05f2ff85f Add lint action 2020-03-14 15:40:02 -07:00
Nora Trapp
96d7b843b5 Github CI test 2020-03-14 15:40:02 -07:00