File: ci.yml

package info (click to toggle)
osslsigncode 2.9-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 2,112 kB
  • sloc: ansic: 11,997; python: 938; sh: 74; makefile: 12
file content (201 lines) | stat: -rw-r--r-- 6,136 bytes parent folder | download | duplicates (2)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: CI

on:
  push:
  pull_request:

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: Release
  version: osslsigncode-2.9

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - id: ubuntu-24.04
            triplet: x64-linux
            compiler: gcc
            os: ubuntu-24.04
            generator: Unix Makefiles
            vcpkg_root:
          - id: ubuntu-22.04
            triplet: x64-linux
            compiler: gcc
            os: ubuntu-22.04
            generator: Unix Makefiles
            vcpkg_root:
          - id: ubuntu-20.04
            triplet: x64-linux
            compiler: gcc
            os: ubuntu-20.04
            generator: Unix Makefiles
            vcpkg_root:
          - id: macOS
            triplet: x64-osx
            compiler: clang
            os: macOS-latest
            generator: Unix Makefiles
            vcpkg_root: /usr/local/share/vcpkg
            cache: /Users/runner/.cache/vcpkg/archives
          - id: windows-x64-vs
            triplet: x64-windows
            compiler: vs
            arch: x64
            os: windows-latest
            generator: Ninja
            vcpkg_root: C:/vcpkg
            cache: C:/Users/runneradmin/AppData/Local/vcpkg/archives
          - id: windows-x86-vs
            triplet: x86-windows
            compiler: vs
            arch: x86
            os: windows-latest
            generator: Ninja
            vcpkg_root: C:/vcpkg
            cache: C:/Users/runneradmin/AppData/Local/vcpkg/archives
          - id: windows-x64-static-vs
            triplet: x64-windows-static
            compiler: vs
            arch: x64
            os: windows-latest
            generator: Ninja
            vcpkg_root: C:/vcpkg
            cache: C:/Users/runneradmin/AppData/Local/vcpkg/archives
          - id: windows-x64-mingw
            triplet: x64-windows
            compiler: mingw
            os: windows-latest
            generator: Ninja
            vcpkg_root: C:/vcpkg
            cache: C:/Users/runneradmin/AppData/Local/vcpkg/archives

    runs-on: ${{matrix.os}}

    env:
      VCPKG_ROOT: ${{matrix.vcpkg_root}}

    steps:
    - uses: actions/checkout@v4

    - name: Cache the vcpkg archives
      if: matrix.cache != ''
      uses: actions/cache@v4
      with:
        path: ${{matrix.cache}}
        key: ${{matrix.id}}-${{hashFiles('vcpkg.json')}}
        restore-keys: |
          ${{matrix.id}}-${{hashFiles('vcpkg.json')}}
          ${{matrix.id}}-

    - name: Configure Visual Studio
      if: matrix.compiler == 'vs'
      uses: ilammy/msvc-dev-cmd@v1
      with:
        arch: ${{matrix.arch}}

    - name: Install MSYS2
      if: matrix.compiler == 'mingw'
      uses: msys2/setup-msys2@v2
      with:
        update: true
        install: mingw-w64-x86_64-ninja

    - name: Put MSYS2_MinGW64 on PATH
      if: matrix.compiler == 'mingw'
      run: echo "D:/a/_temp/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

    - name: Install apt dependencies (Linux)
      if: runner.os == 'Linux'
      run: |
        sudo apt-get update
        sudo apt-get remove needrestart || echo Ignored
        sudo apt-get install -y libssl-dev zlib1g-dev python3-cryptography

    - name: Install brew dependencies (macOS)
      if: runner.os == 'macOS'
      run: |
        brew install python@3.8

    - name: Install Xcode (macOS)
      if: runner.os == 'macOS'
      uses: maxim-lobanov/setup-xcode@v1
      with:
        xcode-version: latest-stable

    - name: Setup the oldest supported version of cmake (macOS)
      if: runner.os == 'macOS'
      uses: jwlawson/actions-setup-cmake@v2.0
      with:
        cmake-version: '3.17.0'

    - name: Install python3 cryptography module (macOS)
      if: runner.os == 'macOS'
      run: |
        python3.8 -m ensurepip
        python3.8 -m pip install --upgrade pip
        python3.8 -m pip install cryptography

    - name: Install python3 cryptography module (Windows)
      if: runner.os == 'Windows'
      run: |
        C:/hostedtoolcache/windows/Python/3.12.3/x64/python3.exe -m ensurepip
        C:/hostedtoolcache/windows/Python/3.12.3/x64/python.exe -m pip install --upgrade pip
        C:/hostedtoolcache/windows/Python/3.12.3/x64/python.exe -m pip install cryptography

    - name: Configure CMake
      run: cmake
        -G "${{matrix.generator}}"
        -S ${{github.workspace}}
        -B ${{github.workspace}}/build
        -DCMAKE_OSX_ARCHITECTURES=arm64
        -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
        -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/dist
        -DVCPKG_TARGET_TRIPLET=${{matrix.triplet}}

    - name: Build
      run: cmake
        --build ${{github.workspace}}/build
        --config ${{env.BUILD_TYPE}}

    - name: Show python version (macOS)
      working-directory: ${{github.workspace}}/build
      if: runner.os == 'macOS'
      run: |
        python3.8 --version
        python3.8 -c "import sys; print(sys.executable)"
        python3.8 -c "import cryptography; print(f'Python3 cryptography version {cryptography.__version__}')"

    - name: List files (Linux/macOS)
      if: runner.os != 'Windows'
      run: find .. -ls

    - name: List files (Windows)
      if: runner.os == 'Windows'
      run: Get-ChildItem -Recurse -Name ..

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{env.BUILD_TYPE}}

    - name: Upload the errors
      uses: actions/upload-artifact@v4
      if: failure()
      with:
        name: errors-${{matrix.id}}
        path: |
          ${{github.workspace}}/build/Testing/Temporary/LastTest.log
          ${{github.workspace}}/build/Testing/conf/makecerts.log
          ${{github.workspace}}/build/Testing/logs/server.log
          ${{github.workspace}}/build/Testing/logs/port.log

    - name: Install
      run: cmake --install ${{github.workspace}}/build

    - name: Upload the executables
      uses: actions/upload-artifact@v4
      with:
        name: ${{env.version}}-${{matrix.id}}
        path: ${{github.workspace}}/dist