@@ -4,9 +4,9 @@ permissions:
44
55on :
66 push :
7- branches : [ main, "pr/**" ]
7+ branches : [main, "pr/**"]
88 pull_request :
9- branches : [ main ]
9+ branches : [main]
1010 types : ["labeled", "opened", "synchronize", "reopened"]
1111 workflow_dispatch :
1212 merge_group :
2424 common :
2525 strategy :
2626 matrix :
27- os : [ ubuntu-24.04, windows-latest, macOS-latest ]
27+ os : [ubuntu-24.04, windows-latest, macOS-latest]
2828 runs-on : ${{ matrix.os }}
2929 steps :
3030 - name : Install mimetype
8484 if : runner.os != 'Windows'
8585 run : just test-serial
8686
87-
8887 ubuntu-doc-build :
8988 runs-on : ubuntu-24.04
9089 steps :
@@ -100,10 +99,15 @@ jobs:
10099 steps :
101100 - uses : actions/checkout@v4
102101 - uses : ./.github/workflows/ubuntu-prepare
103- - uses : Swatinem/rust-cache@v2
102+ - name : install mdbook
103+ uses : baptiste0928/cargo-install@v3
104+ with :
105+ crate : mdbook
104106 # ---- doc check ----
105107 - name : Test Docs
106108 run : just test-docs
109+ # DO NOT move the cache pull before this point, as it causes mdbook to fail due to duplicated deps
110+ - uses : Swatinem/rust-cache@v2
107111
108112 ubuntu-miri :
109113 runs-on : ubuntu-24.04
@@ -112,7 +116,7 @@ jobs:
112116 - uses : actions/checkout@v4
113117 - uses : ./.github/workflows/ubuntu-prepare
114118 with :
115- use_nightly : ' true'
119+ use_nightly : " true"
116120 - name : Add miri
117121 run : rustup +nightly component add miri
118122 - uses : Swatinem/rust-cache@v2
@@ -168,7 +172,27 @@ jobs:
168172 needs : ubuntu
169173 strategy :
170174 matrix :
171- instance_idx : [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" ]
175+ instance_idx :
176+ [
177+ " 0" ,
178+ " 1" ,
179+ " 2" ,
180+ " 3" ,
181+ " 4" ,
182+ " 5" ,
183+ " 6" ,
184+ " 7" ,
185+ " 8" ,
186+ " 9" ,
187+ " 10" ,
188+ " 11" ,
189+ " 12" ,
190+ " 13" ,
191+ " 14" ,
192+ " 15" ,
193+ " 16" ,
194+ " 17" ,
195+ ]
172196 fail-fast : false
173197 steps :
174198 - uses : actions/checkout@v4
@@ -234,8 +258,8 @@ jobs:
234258 - name : Run linkspector
235259 uses : umbrelladocs/action-linkspector@v1
236260 with :
237- fail_on_error : ' true'
238- config_file : ' .github/.linkspector.yml'
261+ fail_on_error : " true"
262+ config_file : " .github/.linkspector.yml"
239263
240264 msrv :
241265 runs-on : ubuntu-latest
@@ -342,8 +366,8 @@ jobs:
342366
343367 runs-on : ubuntu-24.04
344368 steps :
345- # Get the name of the fuzzer so that we can use it as the key for a cache
346- # of the built artefacts. The key cannot have any special characters.
369+ # Get the name of the fuzzer so that we can use it as the key for a cache
370+ # of the built artefacts. The key cannot have any special characters.
347371 - name : Get fuzzer name
348372 id : fuzzer_name
349373 run : |
@@ -416,7 +440,7 @@ jobs:
416440 strategy :
417441 fail-fast : false
418442 matrix :
419- os : [ ubuntu-24.04 ]
443+ os : [ubuntu-24.04]
420444 fuzzer :
421445 - fuzzers/full_system/unicorn
422446 steps :
@@ -441,17 +465,17 @@ jobs:
441465 strategy :
442466 matrix :
443467 fuzzer :
444- - binary_only/qemu_cmin
445- - binary_only/qemu_tmin
446- - binary_only/qemu_coverage
447- - binary_only/qemu_launcher
448- # - full_system/qemu_linux_kernel
449- # - full_system/qemu_linux_process
468+ - binary_only/qemu_cmin
469+ - binary_only/qemu_tmin
470+ - binary_only/qemu_coverage
471+ - binary_only/qemu_launcher
472+ # - full_system/qemu_linux_kernel
473+ # - full_system/qemu_linux_process
450474 runs-on : ubuntu-24.04
451475 # container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
452476 steps :
453- # Get the name of the fuzzer so that we can use it as the key for a cache
454- # of the built artefacts. The key cannot have any special characters.
477+ # Get the name of the fuzzer so that we can use it as the key for a cache
478+ # of the built artefacts. The key cannot have any special characters.
455479 - name : Get fuzzer name
456480 id : fuzzer_name
457481 run : |
@@ -464,7 +488,7 @@ jobs:
464488 - name : Configure Cache
465489 uses : Swatinem/rust-cache@v2
466490 with :
467- # We will have each of these fuzzers have it's own cache since these
491+ # We will have each of these fuzzers have its own cache since these
468492 # are some of the heaviest fuzzers to build.
469493 shared-key : qemu-${{ steps.fuzzer_name.outputs.fuzzer_name }}-x86_64
470494 # We want to include the commit hash to ensure the cache is replaced
@@ -483,7 +507,6 @@ jobs:
483507 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} \
484508 just test-fuzzer fuzzers/${{ matrix.fuzzer }}
485509
486-
487510 # Job to build and test the QEMU fuzzers
488511 qemu-system :
489512 name : 🤖 ${{ matrix.fuzzer }}
@@ -494,14 +517,14 @@ jobs:
494517 strategy :
495518 matrix :
496519 fuzzer :
497- - full_system/qemu_baremetal
498- - full_system/qemu_linux_kernel
499- # - full_system/qemu_linux_process
520+ - full_system/qemu_baremetal
521+ - full_system/qemu_linux_kernel
522+ # - full_system/qemu_linux_process
500523 runs-on : ubuntu-24.04
501524 # container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
502525 steps :
503- # Get the name of the fuzzer so that we can use it as the key for a cache
504- # of the built artefacts. The key cannot have any special characters.
526+ # Get the name of the fuzzer so that we can use it as the key for a cache
527+ # of the built artefacts. The key cannot have any special characters.
505528 - name : Get fuzzer name
506529 id : fuzzer_name
507530 run : |
@@ -514,7 +537,7 @@ jobs:
514537 - name : Configure Cache
515538 uses : Swatinem/rust-cache@v2
516539 with :
517- # We will have each of these fuzzers have it's own cache since these
540+ # We will have each of these fuzzers have its own cache since these
518541 # are some of the heaviest fuzzers to build.
519542 shared-key : qemu-${{ steps.fuzzer_name.outputs.fuzzer_name }}-arm
520543 # We want to include the commit hash to ensure the cache is replaced
@@ -543,12 +566,12 @@ jobs:
543566 strategy :
544567 matrix :
545568 fuzzer :
546- - full_system/qemu_baremetal
569+ - full_system/qemu_baremetal
547570 runs-on : ubuntu-24.04
548571 # container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
549572 steps :
550- # Get the name of the fuzzer so that we can use it as the key for a cache
551- # of the built artefacts. The key cannot have any special characters.
573+ # Get the name of the fuzzer so that we can use it as the key for a cache
574+ # of the built artefacts. The key cannot have any special characters.
552575 - name : Get fuzzer name
553576 id : fuzzer_name
554577 run : |
@@ -602,6 +625,62 @@ jobs:
602625 shell : bash
603626 run : just -d utils/${{ matrix.util }} --justfile utils/${{ matrix.util }}/Justfile test
604627
628+ libafl_qemu-full :
629+ if : contains(github.event.pull_request.labels.*.name, 'qemu-full')
630+ runs-on : ubuntu-24.04
631+ strategy :
632+ matrix :
633+ mode :
634+ - usermode
635+ - systemmode
636+ arch :
637+ - aarch64
638+ - arm
639+ - i386
640+ - mips
641+ - ppc
642+ - riscv32
643+ - riscv64
644+ - x86_64
645+ steps :
646+ - name : Checkout
647+ uses : actions/checkout@v4
648+ - name : Prepare
649+ uses : ./.github/workflows/qemu-fuzzer-tester-prepare
650+ - name : Configure Cache
651+ uses : Swatinem/rust-cache@v2
652+ # ---- build normal and examples ----
653+ - name : Build LibAFL QEMU (${{ matrix.mode }} - ${{ matrix.arch }})
654+ env :
655+ LLVM_CONFIG : llvm-config-${{env.MAIN_LLVM_VERSION}}
656+ run : cargo build --verbose --package libafl_qemu --no-default-features --features ${{ matrix.mode }},${{ matrix.arch }}
657+ - name : Test LibAFL QEMU (${{ matrix.mode }} - ${{ matrix.arch }})
658+ env :
659+ LLVM_CONFIG : llvm-config-${{env.MAIN_LLVM_VERSION}}
660+ run : cargo test --package libafl_qemu --no-default-features --features ${{ matrix.mode }},${{ matrix.arch }}
661+
662+ # hexagon systemmode is not available yet in qemu upstream.
663+ # in the meantime, we only test usermode
664+ libafl_qemu-hexagon :
665+ if : contains(github.event.pull_request.labels.*.name, 'qemu-full')
666+ runs-on : ubuntu-24.04
667+ steps :
668+ - name : Checkout
669+ uses : actions/checkout@v4
670+ - name : Prepare
671+ uses : ./.github/workflows/qemu-fuzzer-tester-prepare
672+ - name : Configure Cache
673+ uses : Swatinem/rust-cache@v2
674+ # ---- build normal and examples ----
675+ - name : Build LibAFL QEMU (usermode - hexagon)
676+ env :
677+ LLVM_CONFIG : llvm-config-${{env.MAIN_LLVM_VERSION}}
678+ run : cargo build --verbose --package libafl_qemu --no-default-features --features usermode,hexagon
679+ - name : Test LibAFL QEMU (usermode - hexagon)
680+ env :
681+ LLVM_CONFIG : llvm-config-${{env.MAIN_LLVM_VERSION}}
682+ run : cargo test --package libafl_qemu --no-default-features --features usermode,hexagon
683+
605684 libafl_asan :
606685 name : 🔧 libafl_asan
607686 runs-on : ubuntu-24.04
@@ -640,7 +719,7 @@ jobs:
640719 libafl_qemu_asan :
641720 name : 🔧 libafl_qemu_asan
642721 needs :
643- - qemu-changes
722+ - qemu-changes
644723 if : ${{ needs.qemu-changes.outputs.qemu == 'true' }}
645724 runs-on : ubuntu-24.04
646725 steps :
@@ -693,7 +772,7 @@ jobs:
693772 run : just test-no-std
694773 - name : Build aarch64-unknown-none
695774 run : just build-aarch64-unknown-none
696-
775+
697776 x86-i686-build :
698777 runs-on : ubuntu-24.04
699778
@@ -712,7 +791,6 @@ jobs:
712791 shared-key : x86-i686
713792 - name : test
714793 run : just check-i686
715-
716794
717795 nostd-clippy :
718796 runs-on : ubuntu-24.04
@@ -797,8 +875,7 @@ jobs:
797875 file : ./Dockerfile
798876 push : ${{ github.ref == 'refs/heads/main' }}
799877 load : ${{ github.ref != 'refs/heads/main' }}
800- tags :
801- ghcr.io/aflplusplus/libafl:latest
878+ tags : ghcr.io/aflplusplus/libafl:latest
802879 cache-from : |
803880 type=registry,ref=ghcr.io/aflplusplus/libafl:cache
804881 type=local,src=/tmp/.buildx-cache
@@ -823,20 +900,20 @@ jobs:
823900 strategy :
824901 matrix :
825902 fuzzer :
826- - binary_only/frida_libpng
827- - inprocess/libafl_libfuzzer_windows
828- - inprocess/libfuzzer_stb_image
829- - binary_only/frida_windows_gdiplus
830- - binary_only/tinyinst_simple
831- # - inprocess/libfuzzer_windows_asan
903+ - binary_only/frida_libpng
904+ - inprocess/libafl_libfuzzer_windows
905+ - inprocess/libfuzzer_stb_image
906+ - binary_only/frida_windows_gdiplus
907+ - binary_only/tinyinst_simple
908+ # - inprocess/libfuzzer_windows_asan
832909 fail-fast : false
833910 runs-on : windows-latest
834911 needs :
835912 - fuzzers-preflight
836913 - common
837914 steps :
838- # Get the name of the fuzzer so that we can use it as the key for a cache
839- # of the built artefacts. The key cannot have any special characters.
915+ # Get the name of the fuzzer so that we can use it as the key for a cache
916+ # of the built artefacts. The key cannot have any special characters.
840917 - name : Get fuzzer name
841918 id : fuzzer_name
842919 shell : pwsh
@@ -850,6 +927,10 @@ jobs:
850927 - name : install cxx bridge
851928 # Needs to match version in tinyinst-rs
852929 run : cargo install cxxbridge-cmd@=1.0.190
930+ - name : Install vcpkg dependencies
931+ run : vcpkg install zlib:x64-windows-static-md
932+ env :
933+ VCPKG_ROOT : C:\vcpkg
853934 - name : Configure Cache
854935 uses : Swatinem/rust-cache@v2
855936 with :
@@ -866,6 +947,8 @@ jobs:
866947 fuzzers/${{ matrix.fuzzer }}
867948 - name : Test
868949 run : cd fuzzers/${{ matrix.fuzzer }} && just test
950+ env :
951+ VCPKG_ROOT : C:\vcpkg
869952
870953 windows-clippy :
871954 runs-on : windows-latest
@@ -893,6 +976,8 @@ jobs:
893976 - uses : dtolnay/rust-toolchain@stable
894977 with :
895978 components : clippy
979+ - name : Install nightly
980+ run : rustup toolchain install nightly --component clippy
896981 - name : Install deps
897982 run : brew install z3 gtk+3 python llvm@${{env.MAIN_LLVM_VERSION}}
898983 - name : Install cxxbridge
0 commit comments