31334c504afc0514043adc8f23277dc237af996c
[strongswan.git] / .github / workflows / windows.yml
1 name: Windows
2
3 on: [push, pull_request]
4
5 env:
6   TESTS_REDUCED_KEYLENGTHS: yes
7   CCACHE_BASEDIR: ${{ github.workspace }}
8   CCACHE_COMPRESS: true
9   CCACHE_MAXSIZE: 200M
10   # since the compilers are newly installed every time, we have to use this to
11   # avoid cache misses
12   CCACHE_COMPILERCHECK: content
13   MONOLITHIC: yes
14
15 jobs:
16   pre-check:
17     runs-on: ubuntu-latest
18     outputs:
19       should_skip: ${{ steps.skip-check.outputs.should_skip }}
20     steps:
21       - id: skip-check
22         uses: fkirc/skip-duplicate-actions@master
23         with:
24           concurrent_skipping: 'same_content'
25
26   cross-compile:
27     needs: pre-check
28     if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
29     runs-on: ubuntu-latest
30     strategy:
31       matrix:
32         test: [ win64, win32 ]
33     env:
34       OS_NAME: linux
35       TEST: ${{ matrix.test }}
36     steps:
37       - uses: actions/checkout@v2
38       - uses: actions/cache@v2
39         with:
40           path: ~/.ccache
41           key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
42           restore-keys: |
43             ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:
44             ccache-${{ runner.os }}-${{ matrix.test }}-
45       - run: |
46           sudo apt-get install -qq ccache
47           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
48           ccache -z
49       - uses: ./.github/actions/default
50       - run: ccache -s
51       - if: ${{ failure() }}
52         uses: actions/upload-artifact@v2
53         with:
54           name: Logs ${{ github.job }}
55           path: config.log
56           retention-days: 5