Skip to content
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

Run unit tests on Alpine docker too #19371

Merged
merged 3 commits into from
Aug 24, 2024
Merged

Run unit tests on Alpine docker too #19371

merged 3 commits into from
Aug 24, 2024

Conversation

fjtrujy
Copy link
Contributor

@fjtrujy fjtrujy commented Jul 26, 2024

Description

The scope of this PR is to check in the CI that Unit tests are working fine for the Alpine docker version too.

We are now also offering the possibility of setting the NO_MMAP flag in the compilation scripts.
Current behavior with this flag is not stable, as some unit tests are not passing and with some other is crashing, this is why I have added it to the matrix of testing.
Some other minor changes have been made.

Cheers.

runs-on: ubuntu-latest
container:
image: alpine:latest
options: --shm-size=8g
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the trick to make PPSSPPHeadless to work fine in the dockers

@@ -137,7 +137,7 @@ void MemArena::ReleaseView(s64 offset, void* view, size_t size) {

u8* MemArena::Find4GBBase() {
// Now, create views in high memory where there's plenty of space.
#if PPSSPP_ARCH(64BIT) && !defined(USE_ASAN)
#if PPSSPP_ARCH(64BIT) && !defined(USE_ASAN) && !defined(NO_MMAP)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncomplete condition here...

CMakeLists.txt Outdated Show resolved Hide resolved
@anr2me
Copy link
Collaborator

anr2me commented Jul 27, 2024

Btw @fjtrujy since you're familiar to building ppsspp on Alpine linux, i have a question :)

Did you managed to build ppsspp statically linked without stdc++ dependency? because it always linked to libstdc++ when i tried to build it statically on Alpine linux.

@fjtrujy
Copy link
Contributor Author

fjtrujy commented Jul 27, 2024

Btw @fjtrujy since you're familiar to building ppsspp on Alpine linux, i have a question :)

Did you managed to build ppsspp statically linked without stdc++ dependency? because it always linked to libstdc++ when i tried to build it statically on Alpine linux.

Being honest I didn’t pay attention to this, so I don’t know if internally it uses libstdc++. Shouldn’t be this cmake configuration?

@anr2me
Copy link
Collaborator

anr2me commented Jul 27, 2024

Well i tried searching for "stdc++" on ppsspp repo but can only found it at ios/macos/windows part of CMakeLists.txt/Makefile

@fjtrujy
Copy link
Contributor Author

fjtrujy commented Jul 29, 2024

Well i tried searching for "stdc++" on ppsspp repo but can only found it at ios/macos/windows part of CMakeLists.txt/Makefile

I think that now I understand your issue.
The error you are facing is related to ffmpeg. This is why on the docker layer we manually build ffmpeg using src/ffmpeg && ./linux_x86-64.sh


- name: Fix git detected dubious ownership in repository
run: |
chown -R $(id -u):$(id -g) $PWD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. interesting to know that dubious ownership can be solved this way too.

I was using this for dubious ownership issue on my workflow:

# Fix dubious ownership issue when running git describe inside a container
git config --global --add safe.directory "$PWD"

@fjtrujy
Copy link
Contributor Author

fjtrujy commented Jul 29, 2024

@hrydgard all the tests are passing now and I have applied your suggestions.
Cheers

@anr2me
Copy link
Collaborator

anr2me commented Aug 4, 2024

Just curious, this changes won't make everyone who forked ppsspp need to have Docker account, right? otherwise their build.yml will failed just like the https://github.com/hrydgard/ppsspp/blob/master/.github/workflows/generateDockerLayer.yml

@fjtrujy
Copy link
Contributor Author

fjtrujy commented Aug 4, 2024

Just curious, this changes won't make everyone who forked ppsspp need to have Docker account, right? otherwise their build.yml will failed just like the https://github.com/hrydgard/ppsspp/blob/master/.github/workflows/generateDockerLayer.yml

No, because we are uploading this docker file to the github repository, is not to Docker hub. It doesn't require any grants to do it.

@fjtrujy
Copy link
Contributor Author

fjtrujy commented Aug 24, 2024

@hrydgard any pending thing? I want to merge this.
Thanks!

@hrydgard
Copy link
Owner

Sorry, forgot that there wasn't more to do, heh. Let's get it in.

@hrydgard hrydgard merged commit f7a72e8 into hrydgard:master Aug 24, 2024
19 checks passed
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