This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
forked from mautrix/signal
-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (56 loc) · 1.64 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Go
on: [push, pull_request]
env:
LIBSIGNAL_REF: "v0.22.2"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: signalapp/libsignal
path: libsignal
ref: ${{ env.LIBSIGNAL_REF }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3
- name: Build libsignal
run: |
cd libsignal
cargo build -p libsignal-ffi --release --verbose
- name: Install dependencies
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
export PATH="$HOME/go/bin:$PATH"
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: signalapp/libsignal
path: libsignal
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3
- name: Build libsignal
run: |
cd libsignal
cargo build -p libsignal-ffi --release --verbose
- name: Run tests
run: |
export LIBRARY_PATH=libsignal/target/release
go test -v -json ./pkg/libsignalgo -cover | gotestfmt