This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (76 loc) · 2.91 KB
/
on_pull_request.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# Builds run on every pull request and every push to the repo.
#
name: On_Pull_Request
on: [push, pull_request]
env:
GITHUB_REPO: pmem/miniasync
# use GitHub Container Registry as a repository of docker images
GH_CR_ADDR: ghcr.io
DOCKER_REPO: ghcr.io/pmem/miniasync
# use org's Private Access Token to log in to GitHub Container Registry
GH_CR_USER: ${{ secrets.GH_CR_USER }}
GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
DOC_UPDATE_GITHUB_TOKEN: ${{ secrets.DOC_UPDATE_GITHUB_TOKEN }}
HOST_WORKDIR: /home/runner/work/miniasync/miniasync
WORKDIR: utils/docker
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
CONFIG: ["N=1 OS=ubuntu OS_VER=21.04 TYPE=normal CC=gcc COVERAGE=1",
"N=2 OS=ubuntu OS_VER=21.04 TYPE=normal CC=clang PUSH_IMAGE=1",
"N=3 OS=fedora OS_VER=35 TYPE=normal CC=gcc PUSH_IMAGE=1"]
steps:
- name: Clone the git repo
uses: actions/checkout@v1
- name: Pull or rebuild the image
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh
- name: Run the build
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
- name: Push the image
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"
windows:
name: Windows
runs-on: windows-2022
env:
GENERATOR: "Visual Studio 17 2022"
ARCH: "x64"
platform: x64
msbuild: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\MSBuild\\Current\\Bin"
# Platform Toolset for Visual Studio 2022
platform_toolset: "v143"
perl: "C:\\Strawberry\\perl\\bin"
strategy:
matrix:
BUILD_TYPE: [Debug, Release]
steps:
- name: Update Path
run: |
echo "${env:msbuild}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Clone the git repo
uses: actions/checkout@v2
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Unshallow it
run: git fetch --prune --unshallow
- name: Configure
run: cmake . -Bbuild
-G "${env:GENERATOR}"
-A "${env:ARCH}"
-DCMAKE_BUILD_TYPE="${{ matrix.BUILD_TYPE }}"
-DTESTS_USE_VALGRIND=OFF
-DDEVELOPER_MODE=ON
- name: Build
run: msbuild build/ALL_BUILD.vcxproj /property:Configuration=${{ matrix.BUILD_TYPE }} /verbosity:minimal /m
- name: Tests
working-directory: build
run: ctest -C ${{ matrix.BUILD_TYPE }} --output-on-failure --timeout "${env:TEST_TIMEOUT}"
#- name: Examples
#working-directory: examples
#run: cmake .
#msbuild