Skip to content

ci: test only on arch linux #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

milahu
Copy link
Contributor

@milahu milahu commented Dec 3, 2021

reduce the test madness

  • makes no sense to test c2rust on 6 "different" linux distros
  • darwin loves to hang and block the linux tests → bye bye darwin

todo ...

@thedataking
Copy link
Contributor

It is correct that the Darwin build sometimes fail due to networking issues. At the same time, it is easy to write code that works on Linux but fails on Darwin and our CI setup can catch that. For example, PR #354 seems to hit a compiler error on that platform:

/Users/runner/work/1/s/c2rust-ast-exporter/src/AstExporter.cpp:589:68: error: no member named 'isRValue' in 'clang::Expr'
        encode_entry_raw(ast, tag, ast->getSourceRange(), ty, ast->isRValue(), isVaList,
                                                              ~~~  ^
/Users/runner/work/1/s/c2rust-ast-exporter/src/AstExporter.cpp:2642:25: error: calling a protected constructor of class 'clang::tooling::CommonOptionsParser'
    CommonOptionsParser OptionsParser(argc_, argv_.data(), MyToolCategory);
                        ^
/usr/local/Cellar/llvm/13.0.0_1/include/clang/Tooling/CommonOptionsParser.h:76:3: note: declared protected here
  CommonOptionsParser(
  ^
2 errors generated.

@milahu
Copy link
Contributor Author

milahu commented Dec 4, 2021

it is easy to write code that works on Linux but fails on Darwin and our CI setup can catch that

ideally such bugs are rare, so its enough to test darwin manually = only on demand, not automatic

PR #354 seems to hit a compiler error on that platform

error: no member named 'isRValue' in 'clang::Expr'

sounds more like a version mismatch = api change

# c2rust/scripts/provision_mac.sh
brew install llvm@11

# c2rust/scripts/provision_deb.sh
apt-get install -qq clang-7 libclang-7-dev 

on my machine, the build fails just before that step, so cannot debug that right now
(build fails, cos nix does offline build, so cannot download tinycbor)

@fw-immunant
Copy link
Contributor

fw-immunant commented Dec 10, 2021

The mentioned Darwin failure here does look to be a LLVM version issue--for some reason brew installs both llvm@11 and llvm (which is 13.0.0), and Clang 13 has removed clang::Expr::isRValue.

@thedataking
Copy link
Contributor

thedataking commented Dec 11, 2021

The mentioned Darwin failure here does look to be a LLVM version issue--for some reason brew installs both llvm@11 and llvm (which is 13.0.0), and Clang 13 has removed clang::Expr::isRValue.

Please see feature/ci-dev for fixes to those issues (e.g. 30f9dfe). At one point in time, I had to pin LLVM to llvm@11 but that is no longer necessary. The reason I didn't merge my changes is that I'm seeing unit tests fail.

@thedataking
Copy link
Contributor

Thanks for the contribution, there are some great ideas in there such as using caching to avoid compiling all the dependencies all the time (which should be tracked as a separate issue). However, we won't be reducing the supported/tested platforms down to just Arch Linux.

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.

3 participants