• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) Viktor Szakats
2#
3# SPDX-License-Identifier: curl
4
5name: non-native
6
7on:
8  push:
9    branches:
10      - master
11      - '*/ci'
12    paths-ignore:
13      - '**/*.md'
14      - '.azure-pipelines.yml'
15      - '.circleci/**'
16      - '.cirrus.yml'
17      - 'appveyor.*'
18      - 'packages/**'
19      - 'plan9/**'
20      - 'projects/**'
21      - 'winbuild/**'
22  pull_request:
23    branches:
24      - master
25    paths-ignore:
26      - '**/*.md'
27      - '.azure-pipelines.yml'
28      - '.circleci/**'
29      - '.cirrus.yml'
30      - 'appveyor.*'
31      - 'packages/**'
32      - 'plan9/**'
33      - 'projects/**'
34      - 'winbuild/**'
35
36concurrency:
37  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
38  cancel-in-progress: true
39
40permissions: {}
41
42jobs:
43  netbsd:
44    name: 'NetBSD (cmake, openssl, clang)'
45    runs-on: ubuntu-latest
46    timeout-minutes: 30
47    strategy:
48      matrix:
49        arch: ['x86_64']
50    steps:
51      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
52      - name: 'cmake'
53        uses: cross-platform-actions/action@b2e15da1e667187766fff4945d20b98ac7055576 # v0.24.0
54        with:
55          operating_system: 'netbsd'
56          version: '10.0'
57          architecture: ${{ matrix.arch }}
58          run: |
59            # https://pkgsrc.se/
60            sudo pkgin -y install cmake perl brotli heimdal openldap-client libssh2 libidn2 libpsl nghttp2  # python311 py311-impacket
61            cmake -B bld \
62              -DCMAKE_UNITY_BUILD=ON \
63              -DCURL_WERROR=ON \
64              -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
65              -DBUILD_EXAMPLES=ON \
66              -DENABLE_WEBSOCKETS=ON \
67              -DCURL_USE_OPENSSL=ON \
68              -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON
69            cmake --build bld --config Debug --parallel 3
70            export CURL=$(pwd)/bld/src/curl
71            "${CURL}" --disable --version
72            if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
73              cmake --build bld --config Debug --parallel 3 --target testdeps
74              cmake --build bld --config Debug --target test-ci
75            fi
76
77  openbsd:
78    name: 'OpenBSD (cmake, libressl, clang)'
79    runs-on: ubuntu-latest
80    timeout-minutes: 30
81    strategy:
82      matrix:
83        arch: ['x86_64']
84    steps:
85      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
86      - name: 'cmake'
87        uses: cross-platform-actions/action@b2e15da1e667187766fff4945d20b98ac7055576 # v0.24.0
88        with:
89          operating_system: 'openbsd'
90          version: '7.5'
91          architecture: ${{ matrix.arch }}
92          run: |
93            # https://openbsd.app/
94            sudo pkg_add cmake perl brotli openldap-client libssh2 libidn2 libpsl nghttp2 python3 py3-impacket
95            cmake -B bld \
96              -DCMAKE_UNITY_BUILD=ON \
97              -DCURL_WERROR=ON \
98              -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
99              -DBUILD_EXAMPLES=ON \
100              -DENABLE_WEBSOCKETS=ON \
101              -DCURL_USE_OPENSSL=ON \
102              -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON
103            cmake --build bld --config Debug --parallel 3
104            export CURL=$(pwd)/bld/src/curl
105            "${CURL}" --disable --version
106            if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
107              cmake --build bld --config Debug --parallel 3 --target testdeps
108              export TFLAGS='-j8 ~TFTP'  # FIXME: TFTP requests executed twice? Related: `curl: (69) TFTP: Access Violation`?
109              cmake --build bld --config Debug --target test-ci
110            fi
111
112  freebsd:
113    name: 'FreeBSD (${{ matrix.build }}, openssl, ${{ matrix.compiler }}, ${{ matrix.arch }})'
114    runs-on: ubuntu-latest
115    timeout-minutes: 60
116    strategy:
117      matrix:
118        include:
119          - { build: 'autotools', arch: 'arm64', compiler: 'clang' }
120          - { build: 'cmake'    , arch: 'arm64', compiler: 'clang' }
121      fail-fast: false
122    steps:
123      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
124      - name: 'autotools'
125        if: ${{ matrix.build == 'autotools' }}
126        uses: cross-platform-actions/action@b2e15da1e667187766fff4945d20b98ac7055576 # v0.24.0
127        with:
128          operating_system: 'freebsd'
129          version: '14.0'
130          architecture: ${{ matrix.arch }}
131          run: |
132            # https://ports.freebsd.org/
133            sudo pkg install -y autoconf automake libtool pkgconf brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py39-openssl py39-impacket py39-cryptography
134            sudo pkg delete -y curl
135            autoreconf -fi
136            export CC='${{ matrix.compiler }}'
137            mkdir bld && cd bld && ../configure --enable-debug --enable-warnings --enable-werror \
138              --prefix="${HOME}"/install \
139              --enable-websockets \
140              --with-openssl \
141              --with-brotli --enable-ldap --enable-ldaps --with-libidn2 --with-libssh2 --with-nghttp2 --with-gssapi \
142              --disable-dependency-tracking || { tail -n 1000 config.log; false; }
143            make -j3 install
144            src/curl --disable --version
145            make -j3 examples
146            if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
147              export TFLAGS='-j12'
148              make check V=1
149            fi
150
151      - name: 'cmake'
152        if: ${{ matrix.build == 'cmake' }}
153        uses: cross-platform-actions/action@b2e15da1e667187766fff4945d20b98ac7055576 # v0.24.0
154        with:
155          operating_system: 'freebsd'
156          version: '14.0'
157          architecture: ${{ matrix.arch }}
158          run: |
159            # https://ports.freebsd.org/
160            sudo pkg install -y cmake brotli openldap26-client libidn2 libnghttp2 nghttp2 stunnel py39-openssl py39-impacket py39-cryptography
161            sudo pkg delete -y curl
162            cmake -B bld \
163              -DCMAKE_C_COMPILER=${{ matrix.compiler }} \
164              -DCMAKE_UNITY_BUILD=ON \
165              -DCURL_WERROR=ON \
166              -DENABLE_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
167              -DBUILD_EXAMPLES=ON \
168              -DENABLE_WEBSOCKETS=ON \
169              -DCURL_USE_OPENSSL=ON \
170              -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DCURL_USE_GSSAPI=ON
171            cmake --build bld --config Debug --parallel 3
172            bld/src/curl --disable --version
173            if [ '${{ matrix.arch }}' = 'x86_64' ]; then  # Slow on emulated CPU
174              cmake --build bld --config Debug --parallel 3 --target testdeps
175              export TFLAGS='-j12'
176              cmake --build bld --config Debug --target test-ci
177            fi
178
179  omnios:
180    name: 'OmniOS (autotools, openssl, gcc, amd64)'
181    runs-on: ubuntu-22.04
182    timeout-minutes: 30
183    steps:
184      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
185      - name: 'autotools'
186        uses: vmactions/omnios-vm@7c0ff6e623ee96d9fd7c4dc4cfc92bebd3c4f64a # v1
187        with:
188          usesh: true
189          # https://pkg.omnios.org/r151048/core/en/index.shtml
190          prepare: pkg install build-essential libtool
191          run: |
192            pkg uninstall curl
193            ln -s /usr/bin/gcpp /usr/bin/cpp  # Some tests expect `cpp`, which is named `gcpp` in this env.
194            autoreconf -fi
195            mkdir bld && cd bld && ../configure --enable-debug --enable-warnings --enable-werror \
196              --prefix="${HOME}"/install \
197              --enable-websockets \
198              --with-openssl \
199              --disable-dependency-tracking || { tail -n 1000 config.log; false; }
200            gmake -j3 install
201            src/curl --disable --version
202            gmake -j3 examples
203            export TFLAGS='-j12'
204            gmake check V=1
205