-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 1.9 KB
/
main.yml
File metadata and controls
56 lines (55 loc) · 1.9 KB
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
name: ci
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
- '**.sh'
- 'Vagrantfile'
jobs:
run:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up V version latest
uses: nocturlab/setup-vlang-action@v1
with:
v-version: latest
id: v
- name: Install build deps
run: |
sudo apt update -y
sudo apt-get install -y python3.9 python3.9-dev
v up
- name: Set PY_HEX_VERSION
run: echo PY_HEX_VERSION="$(python3.9 -c 'import sys; print(hex(sys.hexversion))')" >> $GITHUB_ENV
- name: Set PY_VERSION
run: echo PY_VERSION="$(cut -d' ' -f2 <<< $(python3.9 --version))" >> $GITHUB_ENV
- name: Set VLANG_VERSION
run: echo VLANG_VERSION="$(cut -d' ' -f2-3 <<< $(v --version))" >> $GITHUB_ENV
- name: Set cflags
run: echo CFLAGS="$(python3.9-config --includes) -DPy_LIMITED_API=$PY_HEX_VERSION -Wno-incompatible-pointer-types" >> $GITHUB_ENV
- name: Set ldflags
run: echo LDFLAGS="$(python3.9-config --embed --libs)" >> $GITHUB_ENV
- name: Run tests
run: v -stats -showcc -d py_limited_api -cc gcc test $GITHUB_WORKSPACE/*_test.v
- name: Create Python version badge
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 4a5aafa6640cf68e738697dcc693810d
filename: vpy_badge_pyhexver.json
label: Python
message: ${{ env.PY_VERSION }}
color: blue
- name: Create V version badge
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 4a5aafa6640cf68e738697dcc693810d
filename: vpy_badge_vlangver.json
label: V
message: ${{ env.VLANG_VERSION }}
color: purple