From 3f86ebf1ed4908ad0735a190b239e3f3bcbf4cef Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 10 Feb 2022 19:35:11 -0500 Subject: OSX CI Test (#2126) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes. Added compiler crash with generic defined in a function. Added enum-flags test that works (by limiting backing type to int), and using __EnumType constraint. * Add comment about crash. * Disable crashing test. * Fixes to make compile on OSX. * Add github build for OSX. * Make premake generator a utility. * Fix osx compilation issue. * More fixes for OSX build. * OSX fix due to ambiguity around size_t and integer types. * Disable xlib on build on osx. * Use 'prebuildcommands' to make prebuild make utility projects do something. * Small fixes for premake so utility works on linux/osx. * Another hack to try and make generators run when 'utility' * Fix typo in macos.yml. * Revert premake to old style, and disable stdlib embedding on OSX. * OSX testing. * Fix pipe handling for OSX. * Enable testing on OSX. * Small fix because uname -p is not x64 on darwin. --- github_test.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'github_test.sh') diff --git a/github_test.sh b/github_test.sh index f36a0b950..b18566f84 100644 --- a/github_test.sh +++ b/github_test.sh @@ -11,6 +11,16 @@ fi PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') ARCHITECTURE=$(uname -p) +# Darwin is actually macosx (for paths etc) +if [ "${PLATFORM}" == "darwin" ]; then + PLATFORM="macosx" + + # Modern OSX is only 64 bit, so assume that + if [ "${ARCHITECTURE}" == "i386" ]; then + ARCHITECTURE="x64" + fi +fi + if [ "${ARCHITECTURE}" == "x86_64" ]; then ARCHITECTURE="x64" fi @@ -19,7 +29,7 @@ TARGET=${PLATFORM}-${ARCHITECTURE} OUTPUTDIR=bin/${TARGET}/${CONFIGURATION}/ -if [ "${ARCHITECTURE}" == "x64" ]; then +if [ "${ARCHITECTURE}" == "x64" -a "${PLATFORM}" != "macosx" ]; then LOCATION=$(curl -s https://api.github.com/repos/shader-slang/swiftshader/releases/latest \ | grep "tag_name" \ | awk '{print "https://github.com/shader-slang/swiftshader/releases/download/" substr($2, 2, length($2)-3) "/vk_swiftshader_linux_x64.zip"}') -- cgit v1.2.3