github: Migrate from Travis CI to Github Actions
[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   cross-compile:
17     runs-on: ubuntu-latest
18     strategy:
19       matrix:
20         test: [ win64, win32 ]
21     env:
22       OS_NAME: linux
23       TEST: ${{ matrix.test }}
24     steps:
25       - uses: actions/checkout@v2
26       - uses: actions/cache@v2
27         with:
28           path: ~/.ccache
29           key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
30           restore-keys: |
31             ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:
32             ccache-${{ runner.os }}-${{ matrix.test }}-
33       - run: |
34           sudo apt-get install -qq ccache
35           echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
36           ccache -z
37       - uses: ./.github/actions/default
38       - run: ccache -s
39       - if: ${{ failure() }}
40         uses: actions/upload-artifact@v2
41         with:
42           name: Logs ${{ github.job }}
43           path: config.log
44           retention-days: 5