-
Notifications
You must be signed in to change notification settings - Fork 145
155 lines (152 loc) · 5.55 KB
/
integration.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Integration testing
on:
pull_request:
paths:
- '.github/workflows/integration.yaml'
- 'gothemis/**'
- 'src/soter/**'
- 'src/themis/**'
- 'src/wrappers/themis/jsthemis/**'
- 'src/wrappers/themis/php/**'
- 'src/wrappers/themis/php7/**'
- 'src/wrappers/themis/python/**'
- 'src/wrappers/themis/ruby/**'
- 'src/wrappers/themis/rust/**'
- 'src/wrappers/themis/wasm/**'
- 'third_party/boringssl/src/**'
- 'tools/_integration/**'
- 'Cargo.toml'
- '**/*.mk'
- 'Makefile'
- '!**/README*'
push:
branches:
- master
- stable
- release/*
schedule:
- cron: '20 6 * * 1' # every Monday at 6:20 UTC
env:
WITH_FATAL_WARNINGS: yes
jobs:
cross-language:
name: Cross-language tests
runs-on: ubuntu-20.04
steps:
- name: Install system dependencies
run: |
sudo sh -c 'echo "DEBIAN_FRONTEND=noninteractive" >> /etc/environment'
sudo apt update
sudo apt install --yes gcc g++ make libssl-dev \
python python-setuptools \
python3 python3-setuptools \
ruby ruby-dev \
pkg-config clang
- name: Check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Install RVM
run: |
sudo apt install --yes software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt update
sudo apt install rvm
# Recent versions of RVM do not add us to "rvm" group automatically
# and install their binaries into /usr/share, expecting the PATH
# to be set via shell profile. GitHub Actions do not load profile
# so we have to tweak the path manually here.
sudo usermod -a -G rvm $(id -nu)
echo "/usr/share/rvm/bin" >> "$GITHUB_PATH"
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Emscripten
run: |
version=$(cat src/wrappers/themis/wasm/emscripten/VERSION)
# Install Emscripten toolchain as described in documentation:
# https://emscripten.org/docs/getting_started/downloads.html
cd $HOME
git clone https://github.com/emscripten-core/emsdk.git
cd $HOME/emsdk
./emsdk install "$version"
./emsdk activate "$version"
- name: Install PHP from PPA
run: |
sudo apt install --yes software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install --yes \
php7.2 php7.2-fpm- php7.2-dev php7.2-xml php7.2-mbstring
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set php-config /usr/bin/php-config7.2
sudo update-alternatives --set phpize /usr/bin/phpize7.2
- name: Install Themis Core
run: |
make
sudo make install
- name: Install ThemisPP
run: sudo make themispp_install
- name: Install PyThemis
run: sudo make pythemis_install
- name: Install RubyThemis
run: sudo make rbthemis_install
- name: Install GoThemis (test tools)
run: make gothemis_integration_tools
# Cargo pulls in quite a few stuff from the Internet and Rust always
# (slowly) recompiles dependencies, so make heavy use of caching
- name: Cache Cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
restore-keys: ${{ runner.os }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-tools-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-tools-
${{ runner.os }}-cargo-build-target-
- name: Install RustThemis (test tools)
run: make rustthemis_integration_tools
- name: Install JsThemis
run: |
echo Node.js: $(node --version)
echo npm: $(npm --version)
# FIXME(ilammy, 2020-03-20): don't run previous installers as root
# This makes "build" owned by root and JsThemis cannot move there.
# We should not have a reason to build stuff as root.
sudo chown $(id -u):$(id -g) build
make jsthemis_install
- name: Install WasmThemis
run: |
source "$HOME/emsdk/emsdk_env.sh"
emmake make wasmthemis BUILD_PATH=build-wasm
make wasmthemis_install BUILD_PATH=build-wasm
- name: Install PHPThemis
run: |
sudo make phpthemis_install
sudo bash -c 'echo "extension=phpthemis.so" > /etc/php/7.2/cli/conf.d/20-phpthemis.ini'
- name: Run integration tests
run: |
python tests/_integration/tests_generator.py
echo "Integration tests..."
bash tests/_integration/integration_total.sh
echo
echo "Key generation tests..."
bash tests/tools/check_keygen.sh
echo