Debian Codegraph @

src/deps/miniasync/.github/workflows/on_pull_request.yml

raw
1 #
2 # Builds run on every pull request and every push to the repo.
3 #
4
5 name: On_Pull_Request
6 on: [push, pull_request]
7
8 env:
9 GITHUB_REPO: pmem/miniasync
10 # use GitHub Container Registry as a repository of docker images
11 GH_CR_ADDR: ghcr.io
12 DOCKER_REPO: ghcr.io/pmem/miniasync
13
14 # use org's Private Access Token to log in to GitHub Container Registry
15 GH_CR_USER: ${{ secrets.GH_CR_USER }}
16 GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
17 DOC_UPDATE_GITHUB_TOKEN: ${{ secrets.DOC_UPDATE_GITHUB_TOKEN }}
18 HOST_WORKDIR: /home/runner/work/miniasync/miniasync
19 WORKDIR: utils/docker
20
21 jobs:
22 linux:
23 name: Linux
24 runs-on: ubuntu-latest
25 strategy:
26 matrix:
27 CONFIG: ["N=1 OS=ubuntu OS_VER=21.04 TYPE=normal CC=gcc COVERAGE=1",
28 "N=2 OS=ubuntu OS_VER=21.04 TYPE=normal CC=clang PUSH_IMAGE=1",
29 "N=3 OS=fedora OS_VER=35 TYPE=normal CC=gcc PUSH_IMAGE=1"]
30 steps:
31 - name: Clone the git repo
32 uses: actions/checkout@v1
33
34 - name: Pull or rebuild the image
35 run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh
36
37 - name: Run the build
38 run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
39
40 - name: Push the image
41 run: cd $WORKDIR && source ./set-vars.sh && ${{ matrix.CONFIG }} /bin/bash -c "if [[ -f ${CI_FILE_PUSH_IMAGE_TO_REPO} ]]; then images/push-image.sh; fi"
42
43 windows:
44 name: Windows
45 runs-on: windows-2022
46 env:
47 GENERATOR: "Visual Studio 17 2022"
48 ARCH: "x64"
49 platform: x64
50 msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin"
51 # Platform Toolset for Visual Studio 2022
52 platform_toolset: "v143"
53 perl: "C:\\Strawberry\\perl\\bin"
54 strategy:
55 matrix:
56 BUILD_TYPE: [Debug, Release]
57 steps:
58 - name: Update Path
59 run: |
60 echo "${env:msbuild}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
61 - name: Clone the git repo
62 uses: actions/checkout@v2
63
64 - name: Setup MSBuild.exe
65 uses: microsoft/[email protected]
66 with:
67 msbuild-architecture: x64
68
69 - name: Unshallow it
70 run: git fetch --prune --unshallow
71
72 - name: Configure
73 run: cmake . -Bbuild
74 -G "${env:GENERATOR}"
75 -A "${env:ARCH}"
76 -DCMAKE_BUILD_TYPE="${{ matrix.BUILD_TYPE }}"
77 -DTESTS_USE_VALGRIND=OFF
78 -DDEVELOPER_MODE=ON
79
80 - name: Build
81 run: msbuild build/ALL_BUILD.vcxproj /property:Configuration=${{ matrix.BUILD_TYPE }} /verbosity:minimal /m
82
83 - name: Tests
84 working-directory: build
85 run: ctest -C ${{ matrix.BUILD_TYPE }} --output-on-failure --timeout "${env:TEST_TIMEOUT}"
86
87 #- name: Examples
88 #working-directory: examples
89 #run: cmake .
90 #msbuild