Debian Codegraph @

.github/workflows/experimental.yml

raw
1 # Validation builds for experimental features; these shouldn't be
2 # required for pull request approval.
3 name: Experimental Features
4
5 on:
6 push:
7 branches: [ main, maint/* ]
8 pull_request:
9 branches: [ main, maint/* ]
10 workflow_dispatch:
11
12 env:
13 docker-registry: ghcr.io
14 docker-config-path: ci/docker
15
16 permissions:
17 contents: write
18 packages: write
19
20 jobs:
21 # Run our CI/CD builds. We build a matrix with the various build targets
22 # and their details. Then we build either in a docker container (Linux)
23 # or on the actual hosts (macOS, Windows).
24 build:
25 strategy:
26 matrix:
27 platform:
28 # All builds: experimental SHA256 support
29 - name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
30 id: linux-sha256
31 os: ubuntu-latest
32 container:
33 name: xenial
34 env:
35 CC: clang
36 CMAKE_GENERATOR: Ninja
37 CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
38 - name: "macOS (SHA256)"
39 id: macos-sha256
40 os: macos-14
41 setup-script: osx
42 env:
43 CC: clang
44 CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
45 CMAKE_GENERATOR: Ninja
46 PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
47 SKIP_SSH_TESTS: true
48 SKIP_NEGOTIATE_TESTS: true
49 - name: "Windows (SHA256, amd64, Visual Studio)"
50 id: windows-sha256
51 os: windows-2022
52 env:
53 ARCH: amd64
54 CMAKE_GENERATOR: Visual Studio 17 2022
55 CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
56 SKIP_SSH_TESTS: true
57 SKIP_NEGOTIATE_TESTS: true
58 # TODO: this is a temporary removal
59 SKIP_GITDAEMON_TESTS: true
60 fail-fast: false
61 env: ${{ matrix.platform.env }}
62 runs-on: ${{ matrix.platform.os }}
63 name: "Build: ${{ matrix.platform.name }}"
64 steps:
65 - name: Check out repository
66 uses: actions/checkout@v4
67 with:
68 path: source
69 fetch-depth: 0
70 - name: Set up build environment
71 run: source/ci/setup-${{ matrix.platform.setup-script }}-build.sh
72 shell: bash
73 if: matrix.platform.setup-script != ''
74 - name: Setup QEMU
75 run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
76 if: matrix.platform.container.qemu == true
77 - name: Set up container
78 uses: ./source/.github/actions/download-or-build-container
79 with:
80 registry: ${{ env.docker-registry }}
81 config-path: ${{ env.docker-config-path }}
82 container: ${{ matrix.platform.container.name }}
83 github_token: ${{ secrets.github_token }}
84 dockerfile: ${{ matrix.platform.container.dockerfile }}
85 if: matrix.platform.container.name != ''
86 - name: Prepare build
87 run: mkdir build
88 - name: Build
89 uses: ./source/.github/actions/run-build
90 with:
91 command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/build.sh
92 container: ${{ matrix.platform.container.name }}
93 container-version: ${{ env.docker-registry-container-sha }}
94 shell: ${{ matrix.platform.shell }}
95 - name: Test
96 uses: ./source/.github/actions/run-build
97 with:
98 command: cd ${BUILD_WORKSPACE:-.}/build && ../source/ci/test.sh
99 container: ${{ matrix.platform.container.name }}
100 container-version: ${{ env.docker-registry-container-sha }}
101 shell: ${{ matrix.platform.shell }}
102 - name: Upload test results
103 uses: actions/upload-artifact@v4
104 if: success() || failure()
105 with:
106 name: test-results-${{ matrix.platform.id }}
107 path: build/results_*.xml
108
109 test_results:
110 name: Test results
111 needs: [ build ]
112 if: always()
113 runs-on: ubuntu-latest
114 steps:
115 - name: Download test results
116 uses: actions/download-artifact@v4
117 - name: Generate test summary
118 uses: test-summary/action@v2
119 with:
120 paths: 'test-results-*/*.xml'