diff --git a/.github/workflows/linux_clang.yml b/.github/workflows/linux_clang.yml index 5611333..e882a62 100644 --- a/.github/workflows/linux_clang.yml +++ b/.github/workflows/linux_clang.yml @@ -39,4 +39,4 @@ jobs: # Build the test - name: Build Test - run: cd test && bash ./run.sh + run: cd test && bash ./build.sh diff --git a/.github/workflows/linux_gcc.yml b/.github/workflows/linux_gcc.yml index 559bb71..3ababd5 100644 --- a/.github/workflows/linux_gcc.yml +++ b/.github/workflows/linux_gcc.yml @@ -39,5 +39,5 @@ jobs: # Build the test - name: Build Test - run: cd test && bash ./run.sh + run: cd test && bash ./build.sh diff --git a/.github/workflows/macos_x86.yml b/.github/workflows/macos_x86.yml index c64da05..0d1312f 100644 --- a/.github/workflows/macos_x86.yml +++ b/.github/workflows/macos_x86.yml @@ -45,5 +45,5 @@ jobs: # Build the test - name: Build Test - run: cd test && bash ./run.sh + run: cd test && bash ./build.sh diff --git a/test/build.sh b/test/build.sh new file mode 100755 index 0000000..28c509c --- /dev/null +++ b/test/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ $(uname -s) = 'Darwin' ]; then + clang main.c ../libmlx.dylib -L /opt/homebrew/lib -lSDL2 -g; +else + clang main.c ../libmlx.so -lSDL2 -g; +fi + diff --git a/test/run.sh b/test/run.sh index 3b240b9..993cb20 100755 --- a/test/run.sh +++ b/test/run.sh @@ -1,7 +1,4 @@ #!/bin/bash -if [ $(uname -s) = 'Darwin' ]; then - clang main.c ../libmlx.dylib -L /opt/homebrew/lib -lSDL2 -g && ./a.out; -else - clang main.c ../libmlx.so -lSDL2 -g && ./a.out; -fi +bash ./build.sh +./a.out