This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
148 lines (137 loc) · 3.66 KB
/
app-ci.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
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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Set up Environment
run: |
sudo apt install -y python3-wheel
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
- name: Unit Tests
run: |
python3 -m unittest discover tests
- name: Static Checks
run: |
pip3 install flake8 mypy
mypy --config-file ./ci/mypy.cfg ./
flake8 --config ./ci/flake8.cfg
compiled:
runs-on: ubuntu-latest
container:
image: centos:centos7 # Intentionally old
steps:
- uses: actions/checkout@v3
- name: Setup environment
run: |
yum -y install gcc python3-pip python3-devel python3-wheel upx openssl-devel
python3 -m pip install -r ./requirements.txt
- name: Build & Run Binary
run: |
python3 -m pip install pyinstaller
chmod +x ./release/generate_linux_binary.sh
./release/generate_linux_binary.sh
chmod +x ./dist/varc
./dist/varc # check it doesn't return non 0 exit status, i.e. crash
fedora:
runs-on: ubuntu-latest
container:
image: fedora
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
cat /etc/os-release
yum -y install gcc python3-devel python3-wheel openssl-devel
python3 -m pip install yara-python
pip3 install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py
centos:
runs-on: ubuntu-latest
container:
image: centos:centos7 # Intentionally old
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
cat /etc/os-release
yum -y install python3
pip3 install --upgrade pip
yum -y install gcc python3-devel upx openssl-devel
pip3 install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py
debian:
runs-on: ubuntu-latest
container:
image: python:3.9.11-bullseye
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
cat /etc/os-release
python -m pip install --upgrade pip
pip3 install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py
alpine:
runs-on: ubuntu-latest
container:
image: python:3.9.11-alpine
steps:
- uses: actions/checkout@v3
- name: Setup Environment
run: |
cat /etc/os-release
python -m pip install --upgrade pip
apk update
apk add python3-dev py3-wheel gcc libc-dev linux-headers libmagic libressl-dev
#pip3 install -r ./requirements.txt
python -m pip install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Environment
run: |
pip3 install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Environment
run: |
pip3 install -r ./requirements.txt
- name: Run varc Python
run: |
python3 varc.py