mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Transfer test programs as well for cross-testing
This commit is contained in:
23
.github/workflows/testing.yml
vendored
23
.github/workflows/testing.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
mkdir bins
|
mkdir bins
|
||||||
cp rgb{asm,link,fix,gfx} bins
|
cp rgb{asm,link,fix,gfx} bins
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: rgbds-canary-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.buildsys }}
|
name: rgbds-canary-${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.buildsys }}
|
||||||
path: bins
|
path: bins
|
||||||
@@ -134,7 +134,7 @@ jobs:
|
|||||||
mkdir bins
|
mkdir bins
|
||||||
cp install_dir/bin/{rgbasm.exe,rgblink.exe,rgbfix.exe,rgbgfx.exe,zlib1.dll,libpng16.dll} bins
|
cp install_dir/bin/{rgbasm.exe,rgblink.exe,rgbfix.exe,rgbgfx.exe,zlib1.dll,libpng16.dll} bins
|
||||||
- name: Upload Windows binaries
|
- name: Upload Windows binaries
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: rgbds-canary-win${{ matrix.bits }}
|
name: rgbds-canary-win${{ matrix.bits }}
|
||||||
path: bins
|
path: bins
|
||||||
@@ -186,11 +186,20 @@ jobs:
|
|||||||
cp /usr/${{ matrix.triplet }}/lib/zlib1.dll bins
|
cp /usr/${{ matrix.triplet }}/lib/zlib1.dll bins
|
||||||
cp /usr/${{ matrix.triplet }}/bin/libpng16-16.dll bins
|
cp /usr/${{ matrix.triplet }}/bin/libpng16-16.dll bins
|
||||||
if [ ${{ matrix.bits }} -eq 32 ]; then cp /usr/lib/gcc/${{ matrix.triplet }}/7.3-win32/lib{gcc_s_sjlj-1,stdc++-6}.dll bins; fi
|
if [ ${{ matrix.bits }} -eq 32 ]; then cp /usr/lib/gcc/${{ matrix.triplet }}/7.3-win32/lib{gcc_s_sjlj-1,stdc++-6}.dll bins; fi
|
||||||
|
mv test/gfx/randtilegen{,.exe}
|
||||||
|
mv test/gfx/rgbgfx_test{,.exe}
|
||||||
- name: Upload Windows binaries
|
- name: Upload Windows binaries
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: rgbds-canary-mingw-win${{ matrix.bits }}
|
name: rgbds-canary-mingw-win${{ matrix.bits }}
|
||||||
path: bins
|
path: bins
|
||||||
|
- name: Upload Windows test binaries
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: testing-programs-mingw-win${{ matrix.bits }}
|
||||||
|
path: |
|
||||||
|
test/gfx/randtilegen.exe
|
||||||
|
test/gfx/rgbgfx_test.exe
|
||||||
|
|
||||||
windows-xtesting:
|
windows-xtesting:
|
||||||
needs: windows-xbuild
|
needs: windows-xbuild
|
||||||
@@ -202,14 +211,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Retrieve binaries
|
- name: Retrieve binaries
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: rgbds-canary-mingw-win${{ matrix.bits }}
|
name: rgbds-canary-mingw-win${{ matrix.bits }}
|
||||||
path: bins
|
path: bins
|
||||||
|
- name: Retrieve test binaries
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: testing-programs-mingw-win${{ matrix.bits }}
|
||||||
|
path: test/gfx
|
||||||
- name: Extract binaries
|
- name: Extract binaries
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cp bins/* .
|
cp bins/* .
|
||||||
|
cp bins/*.dll test/gfx
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -254,11 +254,13 @@ develop:
|
|||||||
# install instructions instead.
|
# install instructions instead.
|
||||||
|
|
||||||
mingw32:
|
mingw32:
|
||||||
$Q${MAKE} CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ \
|
$Q${MAKE} all test/gfx/randtilegen test/gfx/rgbgfx_test \
|
||||||
|
CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ \
|
||||||
BISON=bison PKG_CONFIG=i686-w64-mingw32-pkg-config -j
|
BISON=bison PKG_CONFIG=i686-w64-mingw32-pkg-config -j
|
||||||
|
|
||||||
mingw64:
|
mingw64:
|
||||||
$Q${MAKE} CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \
|
$Q${MAKE} all test/gfx/randtilegen test/gfx/rgbgfx_test \
|
||||||
|
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \
|
||||||
BISON=bison PKG_CONFIG=x86_64-w64-mingw32-pkg-config -j
|
BISON=bison PKG_CONFIG=x86_64-w64-mingw32-pkg-config -j
|
||||||
|
|
||||||
wine-shim:
|
wine-shim:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
// For `execProg` (Windows is its special little snowflake again)
|
// For `execProg` (Windows is its special little snowflake again)
|
||||||
#ifndef _MSC_VER
|
#if !defined(_MSC_VER) && !defined(__MINGW32__)
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static char *execProg(char const *name, char * const *argv) {
|
static char *execProg(char const *name, char * const *argv) {
|
||||||
#ifndef _MSC_VER
|
#if !defined(_MSC_VER) && !defined(__MINGW32__)
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
int err = posix_spawn(&pid, argv[0], nullptr, nullptr, argv, nullptr);
|
int err = posix_spawn(&pid, argv[0], nullptr, nullptr, argv, nullptr);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
@@ -298,7 +298,7 @@ static char *execProg(char const *name, char * const *argv) {
|
|||||||
fatal("%s returned with status %d", name, info.si_status);
|
fatal("%s returned with status %d", name, info.si_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* defined(_MSC_VER) */
|
#else /* defined(_MSC_VER) || defined(__MINGW32__) */
|
||||||
|
|
||||||
auto winStrerror = [](DWORD errnum) {
|
auto winStrerror = [](DWORD errnum) {
|
||||||
LPTSTR buf;
|
LPTSTR buf;
|
||||||
|
|||||||
Reference in New Issue
Block a user