|
| 1 | +name: build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: dev |
| 6 | + paths-ignore: |
| 7 | + - '**.md' |
| 8 | + - '**/*.md.in' |
| 9 | + - 'docs/**' |
| 10 | + - '.github/workflows/docs.yml' |
| 11 | + - '.github/workflows/codeql.yml' |
| 12 | + pull_request: |
| 13 | + types: [opened, synchronize, reopened, ready_for_review] |
| 14 | + paths-ignore: |
| 15 | + - '**.md' |
| 16 | + - '**/*.md.in' |
| 17 | + - 'docs/**' |
| 18 | + |
| 19 | +env: |
| 20 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 21 | + PING_HOST: github.com |
| 22 | + |
| 23 | +jobs: |
| 24 | + win-msvc: |
| 25 | + runs-on: windows-latest |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + arch: |
| 29 | + - x86 |
| 30 | + - x64 |
| 31 | + env: |
| 32 | + BUILD_ARCH: ${{ matrix.arch }} |
| 33 | + |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + submodules: 'recursive' |
| 38 | + |
| 39 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 40 | + with: |
| 41 | + arch: ${{ env.BUILD_ARCH }} |
| 42 | + uwp: 'false' |
| 43 | + |
| 44 | + - name: Build |
| 45 | + shell: pwsh |
| 46 | + run: | |
| 47 | + .\tools\ci.ps1 -p win32 -a $env:BUILD_ARCH |
| 48 | + win-clang: |
| 49 | + runs-on: windows-latest |
| 50 | + |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + with: |
| 54 | + submodules: 'recursive' |
| 55 | + |
| 56 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 57 | + with: |
| 58 | + arch: ${{ env.BUILD_ARCH }} |
| 59 | + uwp: 'false' |
| 60 | + - name: Build |
| 61 | + shell: pwsh |
| 62 | + run: | |
| 63 | + .\tools\ci.ps1 -p win32 -cc clang |
| 64 | + win-mingw: |
| 65 | + runs-on: windows-latest |
| 66 | + |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v4 |
| 69 | + with: |
| 70 | + submodules: 'recursive' |
| 71 | + |
| 72 | + - uses: msys2/setup-msys2@v2 |
| 73 | + with: |
| 74 | + msystem: mingw64 |
| 75 | + install: mingw-w64-x86_64-toolchain |
| 76 | + - name: Build |
| 77 | + run: .\tools\ci.ps1 -p win32 -cc 'gcc' |
| 78 | + winuwp: |
| 79 | + runs-on: windows-latest |
| 80 | + strategy: |
| 81 | + matrix: |
| 82 | + arch: |
| 83 | + - x64 |
| 84 | + - arm64 |
| 85 | + env: |
| 86 | + BUILD_ARCH: ${{ matrix.arch }} |
| 87 | + |
| 88 | + steps: |
| 89 | + - uses: actions/checkout@v4 |
| 90 | + with: |
| 91 | + submodules: 'recursive' |
| 92 | + |
| 93 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 94 | + with: |
| 95 | + arch: ${{ env.BUILD_ARCH }} |
| 96 | + uwp: 'true' |
| 97 | + |
| 98 | + - name: Build |
| 99 | + shell: pwsh |
| 100 | + run: .\tools\ci.ps1 -p winuwp -a $env:BUILD_ARCH |
| 101 | + linux: |
| 102 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 103 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 104 | + # cross-platform coverage. |
| 105 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 106 | + runs-on: ubuntu-latest |
| 107 | + |
| 108 | + steps: |
| 109 | + - uses: actions/checkout@v4 |
| 110 | + with: |
| 111 | + submodules: 'recursive' |
| 112 | + |
| 113 | + - name: Build |
| 114 | + # Execute the build. You can specify a specific target with "--target <NAME>" |
| 115 | + shell: pwsh |
| 116 | + run: | |
| 117 | + ./tools/ci.ps1 -p linux |
| 118 | + android: |
| 119 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 120 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 121 | + # cross-platform coverage. |
| 122 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 123 | + runs-on: windows-latest |
| 124 | + |
| 125 | + strategy: |
| 126 | + matrix: |
| 127 | + arch: |
| 128 | + - armv7 |
| 129 | + - arm64 |
| 130 | + - x86 |
| 131 | + - x64 |
| 132 | + env: |
| 133 | + BUILD_ARCH: ${{ matrix.arch }} |
| 134 | + |
| 135 | + steps: |
| 136 | + - uses: actions/checkout@v4 |
| 137 | + with: |
| 138 | + submodules: 'recursive' |
| 139 | + |
| 140 | + - name: Build |
| 141 | + # Execute the build. You can specify a specific target with "--target <NAME>" |
| 142 | + shell: pwsh |
| 143 | + run: ./tools/ci.ps1 -p android -a $env:BUILD_ARCH |
| 144 | + osx: |
| 145 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 146 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 147 | + # cross-platform coverage. |
| 148 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 149 | + runs-on: macos-latest |
| 150 | + |
| 151 | + strategy: |
| 152 | + matrix: |
| 153 | + arch: |
| 154 | + - x64 |
| 155 | + - arm64 |
| 156 | + env: |
| 157 | + BUILD_ARCH: ${{ matrix.arch }} |
| 158 | + |
| 159 | + steps: |
| 160 | + - uses: actions/checkout@v4 |
| 161 | + with: |
| 162 | + submodules: 'recursive' |
| 163 | + |
| 164 | + - name: Build |
| 165 | + # Execute the build. You can specify a specific target with "--target <NAME>" |
| 166 | + shell: pwsh |
| 167 | + run: | |
| 168 | + ./tools/ci.ps1 -p osx -a $env:BUILD_ARCH |
| 169 | + ios: |
| 170 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 171 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 172 | + # cross-platform coverage. |
| 173 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 174 | + runs-on: macos-latest |
| 175 | + |
| 176 | + strategy: |
| 177 | + matrix: |
| 178 | + target: |
| 179 | + - ios |
| 180 | + - tvos |
| 181 | + - watchos |
| 182 | + env: |
| 183 | + BUILD_TARGET: ${{ matrix.target }} |
| 184 | + |
| 185 | + steps: |
| 186 | + - uses: actions/checkout@v4 |
| 187 | + with: |
| 188 | + submodules: 'recursive' |
| 189 | + |
| 190 | + - name: Build |
| 191 | + # Execute the build. You can specify a specific target with "--target <NAME>" |
| 192 | + shell: pwsh |
| 193 | + run: ./tools/ci.ps1 -p $env:BUILD_TARGET -a arm64 |
| 194 | + freebsd: |
| 195 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 196 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 197 | + # cross-platform coverage. |
| 198 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 199 | + runs-on: ubuntu-latest |
| 200 | + |
| 201 | + steps: |
| 202 | + - uses: actions/checkout@v4 |
| 203 | + with: |
| 204 | + submodules: 'recursive' |
| 205 | + - name: Build |
| 206 | + uses: vmactions/freebsd-vm@v1 |
| 207 | + with: |
| 208 | + release: '14.2' |
| 209 | + usesh: true |
| 210 | + sync: rsync |
| 211 | + copyback: false |
| 212 | + prepare: | |
| 213 | + pkg install -y git |
| 214 | + pkg install -y cmake |
| 215 | + pkg install -y python3 |
| 216 | + # required by mbedtls-3.3.0 |
| 217 | + pkg search pip |
| 218 | + python3 -V |
| 219 | + # pkg install -y py311-pip |
| 220 | + # pip install --no-deps jsonschema |
| 221 | + # pip install jinja2 |
| 222 | + # install perl5, localtion: /usr/local/bin |
| 223 | + pkg search perl5 |
| 224 | + pkg search perl5 | cut -d' ' -f1 | head -n 1 | xargs pkg install -y |
| 225 | + perl -v |
| 226 | + run: | |
| 227 | + echo Building on freebsd... |
| 228 | + cmake -G "Unix Makefiles" -S . -Bbuild -DYASIO_SSL_BACKEND=2 |
| 229 | + cmake --build build --config Release |
| 230 | + echo run test icmp on freebsd... |
| 231 | + ./build/tests/icmp/icmptest |
| 232 | + solaris: |
| 233 | + # The CMake configure and build commands are platform agnostic and should work equally |
| 234 | + # well on Windows or Mac. You can convert this to a matrix build if you need |
| 235 | + # cross-platform coverage. |
| 236 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 237 | + runs-on: ubuntu-latest |
| 238 | + |
| 239 | + steps: |
| 240 | + - uses: actions/checkout@v4 |
| 241 | + with: |
| 242 | + submodules: 'recursive' |
| 243 | + - name: Build |
| 244 | + uses: vmactions/solaris-vm@main |
| 245 | + with: |
| 246 | + usesh: true |
| 247 | + sync: rsync |
| 248 | + copyback: false |
| 249 | + prepare: | |
| 250 | + # git |
| 251 | + pkgutil -y -i git |
| 252 | + # cmake |
| 253 | + pkgutil -y -i cmake |
| 254 | + # required by mbedtls-3.3.0 |
| 255 | + python3 --version |
| 256 | + # pip-3.5 install jsonschema jinja2 |
| 257 | + # gcc |
| 258 | + echo y | pkg install gcc |
| 259 | + # check tools |
| 260 | + cmake --version |
| 261 | + gcc --version |
| 262 | + perl -v |
| 263 | + run: | |
| 264 | + echo Building on solaris... |
| 265 | + cmake -G "Unix Makefiles" -S . -Bbuild -DYASIO_SSL_BACKEND=2 |
| 266 | + cmake --build build --config Release |
| 267 | + echo run test icmp on solaris ... |
| 268 | + ./build/tests/icmp/icmptest |
| 269 | + echo run ssltest on solaris ... |
| 270 | + ./build/tests/ssl/ssltest |
0 commit comments