-
-
Notifications
You must be signed in to change notification settings - Fork 599
71 lines (69 loc) · 2 KB
/
windows-quick.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: LIEF Windows Quick
on: push
env:
python-version: '3.9'
jobs:
quick-test:
runs-on: windows-2019
strategy:
matrix:
arch: [x64, x86]
fail-fast: false
env:
SCCACHE_CACHE_SIZE: 2G
SCCACHE_DIR: ${{ vars.SCCACHE_DIR }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.python-version }}
architecture: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
choco install ninja
choco install sccache
python -m pip install --upgrade pip setuptools
python -m pip install wheel mako
- uses: ilammy/msvc-dev-cmd@v1
with:
toolset: "14.16"
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
shell: bash
- name: Save sccache
uses: actions/cache@v3
continue-on-error: false
with:
path: ${{ vars.SCCACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.arch }}-quick-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-quick
- name: Start sccache server
run: sccache --start-server
- name: Set env variables
run: |
chcp 65001 #set code page to utf-8
echo ("LIEF_SAMPLES_DIR=" + $env:RUNNER_TEMP + "/samples") >> $env:GITHUB_ENV
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
shell: cmd
- name: Build Python ${{ env.python-version }}
run: |
python -m pip install pytest requests
python tests/dl_samples.py %LIEF_SAMPLES_DIR%
python -m pip -vv install api/python
shell: cmd
- name: Run tests
run: |
python ./tests/run_pytest.py
shell: cmd
- name: sccache stats
run: sccache --show-stats
- name: sccache server
run: sccache --stop-server || true