11name : C/C++ CI
22
3+ # For testing, you can set variables in your repo (Repo -> Settings ->
4+ # Security -> Actions -> Variables) to restrict the tests that are run.
5+ # The supported variables are:
6+ #
7+ # RUN_ONLY_TARGET_CONFIG: Run only the single matching target and config,
8+ # separated by spaces, eg "ubuntu-latest default". All other tests will
9+ # fail immediately.
10+ #
11+ # LTESTS: Override the set of tests run.
12+
313on :
414 push :
5- branches : [ master, pre-stage, release_candidates, dev_major, dev_minor ]
15+ branches : [ master, dev_major, dev_minor ]
616 paths : [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yml' ]
717 pull_request :
8- branches : [ master, release_candidates ]
18+ branches : [ master, dev_major, dev_minor ]
919 paths : [ '**.c', '**.h', '**.m4', '**.sh', '**/Makefile.in', 'configure.ac', '.github/configs', '.github/workflows/c-cpp.yml' ]
1020
1121jobs :
@@ -18,21 +28,22 @@ jobs:
1828 # First we test all OSes in the default configuration.
1929 target :
2030 - ubuntu-22.04
21- - ubuntu -24.04
31+ - ubunut -24.04
2232 - ubuntu-latest
2333 - ubuntu-22.04-arm
2434 - ubuntu-24.04-arm
2535 - macos-13
2636 - macos-14
2737 - macos-15
28- - windows-2019
2938 - windows-2022
39+ - windows-2025
3040 config : [default]
3141 # Then we include any extra configs we want to test for specific VMs.
42+ # Valgrind slows things down quite a bit, so start them first.
3243 include :
33- - { target: windows-2019, config: cygwin-release }
3444 - { target: windows-2022, config: cygwin-release }
35- # binn.c no longer works with c89 so remove this test.
45+ - { target: windows-2025, config: cygwin-release }
46+ # binn no longer supports c89 so skip.
3647# - { target: ubuntu-22.04, config: c89 }
3748 - { target: ubuntu-22.04, config: clang-11 }
3849 - { target: ubuntu-22.04, config: clang-12-Werror }
@@ -56,15 +67,26 @@ jobs:
5667 - { target: ubuntu-22.04, config: valgrind-2 }
5768 - { target: ubuntu-22.04, config: valgrind-3 }
5869 - { target: ubuntu-22.04, config: valgrind-4 }
59- # - { target: ubuntu-22.04, config: valgrind-5 }
70+ - { target: ubuntu-22.04, config: valgrind-5 }
6071 - { target: ubuntu-22.04, config: valgrind-6 }
6172 - { target: ubuntu-22.04, config: valgrind-7 }
6273 - { target: ubuntu-22.04, config: valgrind-unit }
6374 - { target: ubuntu-22.04, config: without-openssl }
6475 - { target: ubuntu-latest, config: gcc-14 }
6576 - { target: ubuntu-latest, config: clang-15 }
6677 - { target: ubuntu-latest, config: clang-19 }
78+ # these don't support our crypto methods
79+ # - { target: ubuntu-latest, config: boringssl }
80+ # - { target: ubuntu-latest, config: aws-lc }
6781 - { target: ubuntu-latest, config: libressl-master }
82+ # We don't support libreSSL earlier than 3.7 due to problems with
83+ # the structures used by the aes-ctr mt cipher that wasn't address
84+ # before 3.7
85+ # - { target: ubuntu-latest, config: libressl-3.2.6 }
86+ # - { target: ubuntu-latest, config: libressl-3.3.6 }
87+ # - { target: ubuntu-latest, config: libressl-3.4.3 }
88+ # - { target: ubuntu-latest, config: libressl-3.5.3 }
89+ # - { target: ubuntu-latest, config: libressl-3.6.1 }
6890 - { target: ubuntu-latest, config: libressl-3.7.2 }
6991 - { target: ubuntu-latest, config: libressl-3.8.4 }
7092 - { target: ubuntu-latest, config: libressl-3.9.2 }
@@ -102,26 +124,36 @@ jobs:
102124 - { target: ubuntu-latest, config: putty-snapshot }
103125 - { target: ubuntu-latest, config: zlib-develop }
104126 - { target: ubuntu-latest, config: tcmalloc }
105- # musl doesn 't work because it doesn't know about linux/tcp.h
106- # - { target: ubuntu-latest, config: musl }
127+ # musl doens 't know about linux/tcp.h so skip
128+ # - { target: ubuntu-latest, config: musl }
107129 - { target: ubuntu-22.04-arm, config: kitchensink }
108130 - { target: ubuntu-24.04-arm, config: kitchensink }
109- # we know pam doesn 't work because we can't install a new pam file
110- # for hpnssh via the CI test methods
111- # - { target: macos-13, config: pam }
112- # - { target: macos-14, config: pam }
113- # - { target: macos-15, config: pam }
131+ # Can 't copy the necessary pam file in darwin without
132+ # user interaction so skip these
133+ # - { target: macos-13, config: pam }
134+ # - { target: macos-14, config: pam }
135+ # - { target: macos-15, config: pam }
114136 runs-on : ${{ matrix.target }}
137+ env :
138+ EPHEMERAL_VM : yes
115139 steps :
140+ - name : check RUN_ONLY_TARGET_CONFIG
141+ if : vars.RUN_ONLY_TARGET_CONFIG != ''
142+ run : sh -c 'if [ "${{ vars.RUN_ONLY_TARGET_CONFIG }}" != "${{ matrix.target }} ${{matrix.config }}" ]; then exit 1; else exit 0; fi'
116143 - name : set cygwin git params
117144 if : ${{ startsWith(matrix.target, 'windows') }}
118145 run : git config --global core.autocrlf input
119146 - name : install cygwin
147+ id : cygwin_install
120148 if : ${{ startsWith(matrix.target, 'windows') }}
121149 uses : cygwin/cygwin-install-action@master
150+ env :
151+ CYGWIN : " winsymlinks:native"
122152 - uses : actions/checkout@main
123153 - name : setup CI system
124- run : sh ./.github/setup_ci.sh ${{ matrix.config }}
154+ run : sh ./.github/setup_ci.sh ${{ matrix.config }} ${{ matrix.target }}
155+ env :
156+ CYGWIN_SETUP : ${{ steps.cygwin_install.outputs.setup }}
125157 - name : autoreconf
126158 run : sh -c autoreconf
127159 - name : configure
@@ -140,6 +172,13 @@ jobs:
140172 env :
141173 TEST_SSH_UNSAFE_PERMISSIONS : 1
142174 TEST_SSH_HOSTBASED_AUTH : yes
175+ LTESTS : ${{ vars.LTESTS }}
176+ - name : show logs
177+ if : failure()
178+ run : for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done
179+ - name : chown logs
180+ if : failure()
181+ run : test -x "$(which sudo 2>&1)" && sudo chown -R "${LOGNAME}" regress
143182 - name : save logs
144183 if : failure()
145184 uses : actions/upload-artifact@main
@@ -148,8 +187,4 @@ jobs:
148187 path : |
149188 config.h
150189 config.log
151- regress/*.log
152- regress/valgrind-out/
153- regress/asan.log.*
154- regress/msan.log.*
155- regress/log/*
190+ regress/
0 commit comments