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

Trying to adjust Makefile & github actions for MacOS testing. #746

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ jobs:
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y g++-mipsel-linux-gnu
- name: Build OpenBIOS
run: make -C src/mips/openbios -j2
- name: Upload results for MacOS build job
- name: Build tests & OpenBIOS
run: |
make -C src/mips/tests -j 2 PCSX_TESTS=true
make -C src/mips/openbios -j 2 clean all
- name: Upload OpenBIOS for MacOS build job
uses: actions/upload-artifact@v2
with:
name: OpenBIOS
path: src/mips/openbios/openbios.bin
- name: Upload tests for MacOS build job
uses: actions/upload-artifact@v2
with:
name: Tests
path: src/mips/tests/**/*.ps-exe

macos-build-and-test:
runs-on: macOS-latest
Expand All @@ -42,10 +49,20 @@ jobs:
run: git submodule update --init --recursive
- name: Build pcsx-redux
run: make -j2
- name: Build pcsx-redux-tests
run: make -j2 pcsx-redux-tests
- name: Download OpenBIOS build
uses: actions/download-artifact@v2
with:
name: OpenBIOS
- name: Download tests
uses: actions/download-artifact@v2
with:
name: Tests
- name: Install xquartz for xvfb
run: brew install xquartz
- name: Run tests
run: /opt/X11/bin/Xvfb :99 -ac -nolisten unix && DISPLAY=:99 ./pcsx-redux-tests
- name: Bundle
run: ./.github/scripts/create-app.sh
- name: Create BUILD environment
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ clean:
gtest-all.o: $(wildcard third_party/googletest/googletest/src/*.cc)
$(CXX) -O3 -g $(CXXFLAGS) -Ithird_party/googletest/googletest -Ithird_party/googletest/googletest/include -c third_party/googletest/googletest/src/gtest-all.cc

gtest_main.o: third_party/googletest/googletest/src/gtest_main.cc
$(CXX) -O3 -g $(CXXFLAGS) -Ithird_party/googletest/googletest -Ithird_party/googletest/googletest/include -c third_party/googletest/googletest/src/gtest_main.cc

gitclean:
git clean -f -d -x
git submodule foreach --recursive git clean -f -d -x
Expand All @@ -225,8 +228,8 @@ regen-i18n:
rm pcsx-src-list.txt
$(foreach l,$(LOCALES),$(call msgmerge,$(l)))

pcsx-redux-tests: $(foreach t,$(TESTS),$(t).o) $(NONMAIN_OBJECTS) gtest-all.o
$(LD) -o pcsx-redux-tests $(NONMAIN_OBJECTS) gtest-all.o $(foreach t,$(TESTS),$(t).o) -Ithird_party/googletest/googletest/include third_party/googletest/googletest/src/gtest_main.cc $(LDFLAGS)
pcsx-redux-tests: $(foreach t,$(TESTS),$(t).o) $(NONMAIN_OBJECTS) gtest-all.o gtest_main.o
$(LD) -o pcsx-redux-tests gtest_main.o $(NONMAIN_OBJECTS) gtest-all.o $(foreach t,$(TESTS),$(t).o) $(LDFLAGS)

runtests: pcsx-redux-tests
./pcsx-redux-tests
Expand Down