ridiculousfish / libdivide

Official git repository for libdivide: optimized integer division
http://libdivide.com
Other
1.1k stars 79 forks source link

Add GitHub Actions #122

Closed adbancroft closed 4 weeks ago

adbancroft commented 4 weeks ago

Use GitHub actions to build & run these combinations:

OS OS Version Compiler Compiler Version Config Tests
Ubuntu 20.04 GCC 9.4 Release tester, test_c99, benchmark
Ubuntu 20.04 GCC 9.4 Sanitize tester, test_c99
Ubuntu 20.04 Clang 11 Release tester, test_c99, benchmark
Ubuntu 20.04 Clang 11 Sanitize tester, test_c99
Ubuntu 24.04 GCC 13.2 Release tester, test_c99, benchmark
Ubuntu 24.04 GCC 13.2 Sanitize tester, test_c99
Ubuntu 24.04 Clang 18.1.3 Release tester, test_c99, benchmark
Ubuntu 24.04 Clang 18.1.3 Sanitize tester, test_c99
Windows 2019 Cl (MSVC) 19.29 (VS 2019) Release tester, test_c99, benchmark
Windows 2019 Cl (MSVC) 19.29 (VS 2019) Sanitize tester, test_c99
Windows 2019 Clang-Cl (MSVC) 12.0 (VS 2019) Release tester, test_c99, benchmark
Windows 2022 Cl (MSVC) 19.41 (VS 2022) Release tester, test_c99, benchmark
Windows 2022 Cl (MSVC) 19.41 (VS 2022) Sanitize tester, test_c99
Windows 2022 Clang-Cl (MSVC) 17.0.3 (VS 2022) Release tester, test_c99, benchmark
AVR GCC 7.2 Release Tester

Code/cmake changes:

  1. Benchmark is only included in the test suite in the 'Release' config
  2. CMakeLists & CMakeSanitize changes to work with clang-cl
  3. libdivide.h updated to work with VS2019 (and prior) clang-cl

The actions use a "canary build" approach: there's a quick, limited scope, initial build followed by lengthier, more comprehensive, builds if the canary build succeeds. Fixes #121

adbancroft commented 4 weeks ago

Sample runs available here: https://github.com/adbancroft/libdivide/actions/runs/11385614723

adbancroft commented 4 weeks ago

Obviously, if this is merged we should have a follow up PR to remove Appveyor.

kimwalisch commented 4 weeks ago

Obviously, if this is merged we should have a follow up PR to remove Appveyor.

Please just delete the appveyor.yml file in your pull request, it does not make much sense to do this in another pull request.

kimwalisch commented 4 weeks ago

Can you please also replace the Appveyor CI badge in the README.md with a GitHub Actions CI badge? You can copy the required code from e.g. here: https://raw.githubusercontent.com/kimwalisch/primesieve/refs/heads/master/README.md

adbancroft commented 4 weeks ago

Can you please also replace the Appveyor CI badge in the README.md with a GitHub Actions CI badge?

Done - though it won't display correctly until merged

adbancroft commented 4 weeks ago

Please just delete the appveyor.yml file in your pull request, it does not make much sense to do this in another pull request.

I did that initially - it resulted in the PR failing the appveyor build. If that's OK, I can remove it - let me know.