-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (53 loc) · 1.92 KB
/
main.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
name: Run tests
run-name: Tests run by @${{ github.actor }}
on:
workflow_dispatch: {}
pull_request:
branches:
- master
push:
branches:
- master
# push:
# branches:
# - dev
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Python requirements
run: pip install fabric==2.7.1 docker
- name: Set up docker (1)
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
- name: Set up docker (2)
run: |
set -x
docker version
docker run --rm hello-world
- name: Install GNU parallel
run: sudo apt-get install -y parallel
- name: Install lcov
run: sudo apt-get install -y lcov
- name: Install cloc
run: cd /tmp && curl -L http://downloads.sourceforge.net/project/cloc/cloc/v1.64/cloc-1.64.tar.gz | tar xz && cd cloc-* && curl -L https://bugs.archlinux.org/task/45494?getfile=13174 > cloc.1.64.patch && patch -p1 < cloc.1.64.patch && sudo make install
- name: Copy private ssh key to .ssh
run: pwd && mkdir -p ~/.ssh && echo "$PRIVATE_SSH_KEY" > ~/.ssh/id_rsa && ls ~/.ssh
env:
PRIVATE_SSH_KEY: ${{ secrets.SSH_KEY }}
- name: Clone Binutils (Test repo)
run: git clone git://sourceware.org/git/binutils.git repos/binutils
- name: Run tests
run: chmod a+x tests/runtests.sh && ./tests/runtests.sh
- name: Display logs on failure
if: failure()
run: cat tests/logs/tests-offline.log && cat tests/logs/tests-online.log