Conversation
|
My plan was to make a PR of the first commit, see what fails, and then add some commits that disables -Werror/some configurations/etc so the CI starts going green. I'm not sure why the jobs don't run automatically. If this is merged, the jobs will be red for reasons I believe are unrelated to the CI:
|
6fe2713 to
5fc850b
Compare
thiagomacieira
left a comment
There was a problem hiding this comment.
Thank you! This is very much appreciated.
My plan was to make a PR of the first commit, see what fails, and then add some commits that disables -Werror/some configurations/etc so the CI starts going green. I'm not sure why the jobs don't run automatically.
They probably need to be merged first. But meanwhile we can see the results in your fork: https://github.com/pjonsson/tinycbor/actions
- There is no bool type in C90 and some tests are compiled as that
That's not showing up in your fork. Do you have any details?
- Incompatible
-Werror=somethingflag on macOS
Ditto.
- The linux-gcc-non-math test requires math.h in cborinternal_p.h (ldexp. INFINITY, NAN)
That one I can see. That requires a fix in TinyCBOR itself, so we can merge the CI and then fix on top.
- Implicit function declaration of cbor_value_to_pretty_advance_flags in src/cbortojson.c and tools/cbordump/cbordump.c
Not seeing this either, but probably easy to fix.
- Probably some other warning that I have forgotten
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| target-branch: "main" |
There was a problem hiding this comment.
Does the dependabot even work for C code? TinyCBOR has no bundled dependencies (which is the correct way to develop software) so Dependabot not going to find anything even if it works for C code.
There was a problem hiding this comment.
I'm not sure of the complete capabilities of Dependabot, it supports npm, gradle, maven, and a bunch of other ecosystems.
The part configured in this PR is the ecosystem "github-actions", to keep the Github action versions in this CI up to date.
There was a problem hiding this comment.
Ok. I don't see the point, but it won't hurt.
.github/workflows/build.yml
Outdated
| # Install in /usr/bin so the ccache action gets the expected environment. | ||
| - name: install ccache | ||
| if: matrix.os == 'ubuntu-latest' | ||
| run: | | ||
| wget -nv https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz | ||
| sudo tar xf ccache-4.8.3-linux-x86_64.tar.xz -C /usr/bin --strip-components=1 --no-same-owner ccache-4.8.3-linux-x86_64/ccache | ||
| rm -f ccache-*-linux-x86_64.tar.xz | ||
|
|
||
| - name: ccache | ||
| uses: hendrikmuhs/ccache-action@v1.2.10 | ||
| with: | ||
| key: compilation-${{ matrix.os }}-${{ matrix.build_cfg.name }} | ||
| max-size: 160M |
There was a problem hiding this comment.
TinyCBOR is tiny. How much do we gain by having this cached?
There was a problem hiding this comment.
Last time I looked, the Github CI machines were dual core Xeon with a low clock frequency and slow IO. So the gain is noticeable.
There was a problem hiding this comment.
Let me see if I am allowed to accept this third-party action. I think "github.com/intel" may have disabled all third-party actions.
There was a problem hiding this comment.
Sorry, I can't accept this action. It needs to be "actions/" only or a few options.
Depending on which job you are looking at, it's possible you're looking at a branch where -Werror is more or less disabled, bool is typedefed to int when compiling pre-C99 standards, and qmake on macOS is from qt6. I don't have a language standard handy, but https://en.cppreference.com/w/c/keyword/_Bool gives some indication that it was C99 that introduced the boolean type. The build error is on macOS, but the job linked below times out because it takes >45 minutes to build qt5 on macos-11 (macos-11 is no longer supported by homebrew, and qt5 gives angry warnings about not being tested on the default SDK in the macos-latest image (which I think is macos-12)). I'm not sure why qmake from qt6 is prohibited in tinyCBOR, but I think it's easier to fix whatever is required to use qmake from qt6, so one gets binary qt packages from homebrew.
https://github.com/pjonsson/tinycbor/actions/runs/6739438498/job/18320911265 Edit: apparently I confused myself with the -Werror=something issues, it's Clang on Linux, not macOS. |
I decided that the API would use
It was.
I can look into that. |
Well, I personally don't care about pre-C99, but I have a patch for bool on pre-C99 since the C90-test doesn't pass otherwise.
I have a patch for switching macOS to qmake from QT 6 as well. I don't have a mac though, so I can only see that the tests pass that were present in Travis still pass, everything else might crash and burn when switching to QT 6 for all I know. I don't consider the mentioned patches as fixing CI issues though. |
Please submit it. We can discuss whether to accept in the review.
I've fixed the Clang issue. Please rebase to see it. |
|
The bool fix is in #249.
Rebase against what branch? |
main. The change is ... uh... where did it go? Oops, it failed and I didn't notice. Done now, as 0d55382 in main |
Dependabot can provide automatic pull requests for things in the repository that should be updated. Example PR from dependabot against a repo owned by the github organization: github/opensource.guide#2248 Documentation: https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates
5fc850b to
5a0e8b4
Compare
5a0e8b4 to
ae6bef3
Compare
|
Oh is this PR already done, as 0d55382 in main ? If so then should this PR be closed then? (Had a look previously as a request, but wasn't able to find a solution.) |
|
This PR adds Github CI, 0d55382 makes the Makefile work with Clang. |
|
Right. According to the CI logs in your repository, one of the builds is failing. I'll merge as-is and then we can figure out how to fix it. It's better than no CI. |
|
The Github macOS CI runners for "macos-latest" have changed CPUs from x86-64 to M1/M2 in the last month(s), so it's possible things related to macOS broke (more) after I made this PR. |
|
I switched to |
No description provided.