| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
name: Base |
| 6 |
permissions: |
| 7 |
contents: read |
| 8 |
on: |
| 9 |
workflow_call: |
| 10 |
workflow_dispatch: |
| 11 |
|
| 12 |
jobs: |
| 13 |
lint: |
| 14 |
strategy: |
| 15 |
fail-fast: false |
| 16 |
matrix: |
| 17 |
system: [ubuntu-latest, ubuntu-24.04-arm] |
| 18 |
name: Linting |
| 19 |
runs-on: ${{ matrix.system }} |
| 20 |
steps: |
| 21 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 22 |
- uses: ./.github/actions/lint |
| 23 |
with: |
| 24 |
nix-shell: ci-linter |
| 25 |
gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 26 |
cross-prefix: "aarch64-unknown-linux-gnu-" |
| 27 |
quickcheck: |
| 28 |
strategy: |
| 29 |
fail-fast: false |
| 30 |
matrix: |
| 31 |
external: |
| 32 |
- ${{ github.repository_owner != 'pq-code-package' }} |
| 33 |
target: |
| 34 |
- runner: ubuntu-24.04-arm |
| 35 |
name: 'aarch64' |
| 36 |
- runner: ubuntu-latest |
| 37 |
name: 'x86_64' |
| 38 |
- runner: macos-latest |
| 39 |
name: 'macos (aarch64)' |
| 40 |
- runner: macos-15-intel |
| 41 |
name: 'macos (x86_64)' |
| 42 |
exclude: |
| 43 |
- {external: true, |
| 44 |
target: { |
| 45 |
runner: ubuntu-24.04-arm, |
| 46 |
name: 'aarch64' |
| 47 |
}} |
| 48 |
name: Quickcheck (${{ matrix.target.name }}) |
| 49 |
runs-on: ${{ matrix.target.runner }} |
| 50 |
steps: |
| 51 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 52 |
- name: make quickcheck |
| 53 |
run: | |
| 54 |
OPT=0 make quickcheck |
| 55 |
make clean >/dev/null |
| 56 |
OPT=1 make quickcheck |
| 57 |
- uses: ./.github/actions/setup-os |
| 58 |
- name: tests func |
| 59 |
run: | |
| 60 |
./scripts/tests func --check-namespace |
| 61 |
quickcheck-acvp: |
| 62 |
strategy: |
| 63 |
fail-fast: false |
| 64 |
matrix: |
| 65 |
external: |
| 66 |
- ${{ github.repository_owner != 'pq-code-package' }} |
| 67 |
target: |
| 68 |
- runner: ubuntu-24.04-arm |
| 69 |
name: 'aarch64' |
| 70 |
- runner: ubuntu-latest |
| 71 |
name: 'x86_64' |
| 72 |
acvp-version: [v1.1.0.39, v1.1.0.40, v1.1.0.41] |
| 73 |
exclude: |
| 74 |
- {external: true, |
| 75 |
target: { |
| 76 |
runner: ubuntu-24.04-arm, |
| 77 |
name: 'aarch64' |
| 78 |
}} |
| 79 |
name: Quickcheck ACVP (${{ matrix.target.name }}, ${{ matrix.acvp-version }}) |
| 80 |
runs-on: ${{ matrix.target.runner }} |
| 81 |
steps: |
| 82 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 83 |
- name: Run ACVP test |
| 84 |
run: | |
| 85 |
./scripts/tests acvp --version ${{ matrix.acvp-version }} |
| 86 |
quickcheck_bench: |
| 87 |
strategy: |
| 88 |
fail-fast: false |
| 89 |
matrix: |
| 90 |
external: |
| 91 |
- ${{ github.repository_owner != 'pq-code-package' }} |
| 92 |
target: |
| 93 |
- runner: ubuntu-24.04-arm |
| 94 |
name: 'aarch64' |
| 95 |
- runner: ubuntu-24.04-arm |
| 96 |
name: 'aarch64' |
| 97 |
- runner: ubuntu-latest |
| 98 |
name: 'x86_64' |
| 99 |
- runner: macos-latest |
| 100 |
name: 'macos (aarch64)' |
| 101 |
- runner: macos-15-intel |
| 102 |
name: 'macos (x86_64)' |
| 103 |
exclude: |
| 104 |
- {external: true, |
| 105 |
target: { |
| 106 |
runner: ubuntu-24.04-arm, |
| 107 |
name: 'aarch64' |
| 108 |
}} |
| 109 |
name: Quickcheck bench (${{ matrix.target.name }}) |
| 110 |
runs-on: ${{ matrix.target.runner }} |
| 111 |
steps: |
| 112 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 113 |
- name: "tests bench (cycles: NO)" |
| 114 |
run: | |
| 115 |
./scripts/tests bench -c NO |
| 116 |
- name: "tests bench (build only, cycles: PMU)" |
| 117 |
if: ${{ matrix.target.name != 'macos (aarch64)' && matrix.target.name != 'macos (x86_64)' }} |
| 118 |
run: | |
| 119 |
make clean |
| 120 |
./scripts/tests bench -c PMU --no-run |
| 121 |
- name: "tests bench (build only, cycles: PERF)" |
| 122 |
if: ${{ matrix.target.name != 'macos (aarch64)' && matrix.target.name != 'macos (x86_64)' }} |
| 123 |
run: | |
| 124 |
make clean |
| 125 |
./scripts/tests bench -c PERF --no-run |
| 126 |
- name: "tests bench (build only, cycles: MAC)" |
| 127 |
if: ${{ matrix.target.name == 'macos (aarch64)' || matrix.target.name == 'macos (x86_64)' }} |
| 128 |
run: | |
| 129 |
make clean |
| 130 |
./scripts/tests bench -c MAC --no-run |
| 131 |
- name: tests bench components |
| 132 |
run: | |
| 133 |
make clean |
| 134 |
./scripts/tests bench --components -c NO |
| 135 |
quickcheck-c90: |
| 136 |
strategy: |
| 137 |
fail-fast: false |
| 138 |
matrix: |
| 139 |
external: |
| 140 |
- ${{ github.repository_owner != 'pq-code-package' }} |
| 141 |
target: |
| 142 |
- runner: ubuntu-24.04-arm |
| 143 |
name: 'aarch64' |
| 144 |
- runner: ubuntu-latest |
| 145 |
name: 'x86_64' |
| 146 |
exclude: |
| 147 |
- {external: true, |
| 148 |
target: { |
| 149 |
runner: ubuntu-24.04-arm, |
| 150 |
name: 'aarch64' |
| 151 |
}} |
| 152 |
name: Quickcheck C90 (${{ matrix.target.name }}) |
| 153 |
runs-on: ${{ matrix.target.runner }} |
| 154 |
steps: |
| 155 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 156 |
- name: make quickcheck |
| 157 |
run: | |
| 158 |
OPT=0 CFLAGS=-std=c90 make quickcheck |
| 159 |
make clean >/dev/null |
| 160 |
OPT=1 CFLAGS=-std=c90 make quickcheck |
| 161 |
- uses: ./.github/actions/setup-apt |
| 162 |
- name: tests func |
| 163 |
run: | |
| 164 |
./scripts/tests func --cflags="-std=c90" --check-namespace |
| 165 |
- name: tests bench |
| 166 |
run: | |
| 167 |
./scripts/tests bench -c NO --cflags="-std=c90" |
| 168 |
- name: tests bench components |
| 169 |
run: | |
| 170 |
./scripts/tests bench --components -c NO --cflags="-std=c90" |
| 171 |
quickcheck-windows: |
| 172 |
strategy: |
| 173 |
fail-fast: false |
| 174 |
matrix: |
| 175 |
system: [windows-2025, windows-2022] |
| 176 |
name: Quickcheck ${{ matrix.system }} |
| 177 |
runs-on: ${{ matrix.system }} |
| 178 |
steps: |
| 179 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 180 |
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 |
| 181 |
- name: Build test |
| 182 |
shell: powershell |
| 183 |
run: | |
| 184 |
# print compiler version |
| 185 |
cl |
| 186 |
nmake /f ./Makefile.Microsoft_nmake quickcheck |
| 187 |
quickcheck-windows-mingw-w64: |
| 188 |
strategy: |
| 189 |
fail-fast: false |
| 190 |
matrix: |
| 191 |
|
| 192 |
mingw-version: [11.2.0, 12.2.0, 13.2.0, 14.2.0, 15.2.0] |
| 193 |
name: Quickcheck (Mingw-w64 ${{ matrix.mingw-version }}) |
| 194 |
runs-on: windows-latest |
| 195 |
steps: |
| 196 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 197 |
- name: Install MinGW-w64 |
| 198 |
run: choco install mingw --version=${{ matrix.mingw-version }} -y |
| 199 |
shell: cmd |
| 200 |
- name: make quickcheck |
| 201 |
shell: bash |
| 202 |
run: | |
| 203 |
CC=gcc OPT=0 make quickcheck |
| 204 |
CC=gcc make clean >/dev/null |
| 205 |
CC=gcc OPT=1 make quickcheck |
| 206 |
quickcheck-lib: |
| 207 |
name: Quickcheck lib |
| 208 |
strategy: |
| 209 |
matrix: |
| 210 |
system: [macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm] |
| 211 |
runs-on: ${{ matrix.system }} |
| 212 |
steps: |
| 213 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 214 |
- name: make lib |
| 215 |
run: | |
| 216 |
make lib |
| 217 |
simpasm: |
| 218 |
strategy: |
| 219 |
fail-fast: false |
| 220 |
matrix: |
| 221 |
backend: |
| 222 |
- arg: '--aarch64-clean' |
| 223 |
name: Clean |
| 224 |
- arg: '' |
| 225 |
name: Optimized |
| 226 |
simplify: |
| 227 |
- arg: '' |
| 228 |
name: Simplified |
| 229 |
- arg: '--no-simplify' |
| 230 |
name: Unmodified |
| 231 |
runs-on: ubuntu-24.04-arm |
| 232 |
name: AArch64 dev backend (${{ matrix.simplify.name }}) |
| 233 |
steps: |
| 234 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 235 |
- name: Reinstate and test backend |
| 236 |
uses: ./.github/actions/setup-shell |
| 237 |
with: |
| 238 |
nix-shell: 'ci' |
| 239 |
gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 240 |
script: | |
| 241 |
./scripts/autogen ${{ matrix.simplify.arg }} |
| 242 |
make clean |
| 243 |
OPT=1 make quickcheck |
| 244 |
x86_64_intel_syntax: |
| 245 |
name: x86_64 Intel syntax |
| 246 |
runs-on: ubuntu-latest |
| 247 |
steps: |
| 248 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 249 |
- name: Generate with Intel syntax and test |
| 250 |
uses: ./.github/actions/setup-shell |
| 251 |
with: |
| 252 |
nix-shell: 'ci' |
| 253 |
gh_token: ${{ secrets.GITHUB_TOKEN }} |
| 254 |
script: | |
| 255 |
./scripts/autogen --x86-64-syntax intel |
| 256 |
make clean |
| 257 |
./scripts/tests all |
| 258 |
scan-build: |
| 259 |
strategy: |
| 260 |
fail-fast: false |
| 261 |
matrix: |
| 262 |
external: |
| 263 |
- ${{ github.repository_owner != 'pq-code-package' }} |
| 264 |
target: |
| 265 |
- runner: ubuntu-24.04-arm |
| 266 |
name: 'aarch64' |
| 267 |
- runner: ubuntu-latest |
| 268 |
name: 'x86_64' |
| 269 |
name: scan-build (${{ matrix.target.name }}) |
| 270 |
runs-on: ${{ matrix.target.runner }} |
| 271 |
steps: |
| 272 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 273 |
- uses: ./.github/actions/setup-apt |
| 274 |
with: |
| 275 |
packages: clang-tools clang |
| 276 |
- name: make quickcheck |
| 277 |
run: | |
| 278 |
scan-build --status-bugs make quickcheck OPT=0 |
| 279 |
make clean >/dev/null |
| 280 |
scan-build --status-bugs make quickcheck OPT=1 |
| 281 |
symlink-check: |
| 282 |
runs-on: ubuntu-latest |
| 283 |
steps: |
| 284 |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 285 |
- uses: donatj/symlink-check-action@b3c737d0fd4e52752f0b8c71a03f3f775fa015cb |