Skip to content

Add lint and test jobs to CI pipeline#82

Merged
stevemk14ebr merged 3 commits intomandiant:masterfrom
kami922:feature/ci-enhancements
Feb 25, 2026
Merged

Add lint and test jobs to CI pipeline#82
stevemk14ebr merged 3 commits intomandiant:masterfrom
kami922:feature/ci-enhancements

Conversation

@kami922
Copy link
Contributor

@kami922 kami922 commented Feb 24, 2026

Addresses issue #81 — current CI only checks compilation, no tests run.

  • lint (ubuntu-latest): gofmt -l and go vet ./... using default Go tooling only, no third-party linters per maintainer guidance

  • test (ubuntu-latest): runs build_test_files.sh via Docker to generate all 18 Go version binaries (stripped/non-stripped x lin/win/mac x 32/64-bit), then go test ./... covering TestAllVersions, TestWeirdBins, and TestExtractStrings_CompareWithFLOSS

  • build (windows-latest): existing release job unchanged

Addresses issue mandiant#81 — current CI only checks compilation, no tests run.

- lint (ubuntu-latest): gofmt -l and go vet ./... using default Go
  tooling only, no third-party linters per maintainer guidance

- test (ubuntu-latest): runs build_test_files.sh via Docker to generate
  all 18 Go version binaries (stripped/non-stripped x lin/win/mac x
  32/64-bit), then go test ./... covering TestAllVersions,
  TestWeirdBins, and TestExtractStrings_CompareWithFLOSS

- build (windows-latest): existing release job unchanged
@stevemk14ebr
Copy link
Collaborator

good start, workflows can be a pain to get working right so just keep fighting till they all run ok. I will review / approve runs as I'm free and able.

Seperately I noticed our test build script is missing some newer versions, can you add the new versions to our script while you're working on this please? https://github.com/mandiant/GoReSym/blob/master/build_test_files.sh#L4

@kami922
Copy link
Contributor Author

kami922 commented Feb 24, 2026

@stevemk14ebr Hello, I made fixes to failing CI tests and added golang version 1.23 and 1.24 to build_test_files.sh lemme know if i am missing something else. please rerun the tests meanwhile.

@kami922
Copy link
Contributor Author

kami922 commented Feb 25, 2026

I only added versions till 1.24 because I read somewhere in issues or PR that goresym is not currently supporting 1.26 due to its large internal changes in so, it made me skeptical about 1.25 as well. Lemme know if you want me to add 1.25 as well

One limitation to note: Go 1.23 and 1.24, similar to 1.22, produce 10 binaries instead of 12. The testproject_mac_32 and testproject_mac_stripped_32 variants are missing. This is a standard Go toolchain limitation where 32 bit Darwin (GOARCH=386, GOOS=darwin) is no longer supported. Apple dropped 32 bit support starting with macos Catalina (10.15), and Go followed suit by removing the port in version 1.15. All other combinations, including linux/windows 32-bit and all 64 bit variants, build and test correctly.

Other then above I have checked and verified tests are passing

@stevemk14ebr
Copy link
Collaborator

Ah yes the removal of 386 macos binaries is important, do our test cases handle this well? We should not report these missing binaries as test failures, but for the versions where they do exist we do want to test those.

We have someone else working on 1.26 support right now, we'll have that soon hopefully, fine with it not being in the version test list until we have that. We can test 1.25, we should support that. Add this please and I'll merge this!

nit: try to keep formatting changes seperate from feature PRs. It makes it a lot faster to review if I can focus on just the new logic. Not a big deal though, just a nice thing to be aware of

- Add Go 1.23 and 1.24 to versions array in both build_test_files.sh
  and main_test.go — all 10 binary variants pass for both versions
@kami922
Copy link
Contributor Author

kami922 commented Feb 25, 2026

Missing mac_32 binaries are skipped (not failed) via check on line 27 of main_test.go versions that have them still pass, versions that don't simply continue to the next file.

I tested 1.25 and its breaking all tests, rest are passing including 1.24 and .23.

image image

@stevemk14ebr
Copy link
Collaborator

That's too bad, I'll look at why 1.25 is failing soon. Remove for now please 😢

@kami922
Copy link
Contributor Author

kami922 commented Feb 25, 2026

@stevemk14ebr Hello can you please clarify what to remove? I hadn't added 1.25 to any of above commit

@stevemk14ebr
Copy link
Collaborator

Oh sorry I didn't review the diff I assumed you had.

@stevemk14ebr stevemk14ebr merged commit 0ead0ce into mandiant:master Feb 25, 2026
4 checks passed
@stevemk14ebr
Copy link
Collaborator

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants