From 36521e3797418e4e9839f7215e6168fe509f144f Mon Sep 17 00:00:00 2001 From: PhilipDeegan Date: Wed, 21 Aug 2024 19:20:51 +0200 Subject: [PATCH] next --- .github/workflows/build_nix.yml | 22 ++++++++++++++++++++++ mkn.sh | 5 ++--- mkn.yaml | 8 +++----- 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build_nix.yml diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml new file mode 100644 index 0000000..68f05cb --- /dev/null +++ b/.github/workflows/build_nix.yml @@ -0,0 +1,22 @@ + +name: Build on Ubuntu + +on: + pull_request: + +jobs: + build: + name: Ubuntu + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + # sudo apt update && sudo apt install -y libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev + - run: | + curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_nix + chmod +x mkn + PATH="$PWD:$PATH" ./mkn.sh + ./mkn clean build -dtOa -fPIC -p all diff --git a/mkn.sh b/mkn.sh index b0ebfe8..419e0fb 100755 --- a/mkn.sh +++ b/mkn.sh @@ -2,12 +2,11 @@ set -exu CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" && cd $CWD -GLEW_VER=$(mkn -G gl.glew.version -C dep/glew/mkn.prop.yaml) - do_incs() { + mkn -p dep_get mkdir -p inc/GL cp -r dep/gl/inc/GL/* inc/GL/ - cp -r dep/glew/glew-${GLEW_VER}/include/GL/* inc/GL/ + cp -r dep/glew/g/include/GL/* inc/GL/ cp -r dep/glu/g/include/GL/* inc/GL cp -r dep/glfw/g/include/* inc/ cp -r dep/glm/g/glm inc/ diff --git a/mkn.yaml b/mkn.yaml index dfbcca1..fb3d26c 100644 --- a/mkn.yaml +++ b/mkn.yaml @@ -3,9 +3,6 @@ name: mkn.gpu parent: all -property: - gl.glew.version: 2.2.0 - profile: - name: inc inc: inc @@ -16,11 +13,12 @@ profile: bsd: -DMACOSX nix: -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_HAS_DLOPEN win: -D_GLFW_WIN32 -D_GLFW_WGL - win_shared: -D_GLFW_BUILD_DLL + win_shared: -D_GLFW_BUILD_DLL -DGLEW_BUILD -DGLEWAPI + win_static: -DGLEW_STATIC arg: -D_GLFW_USE_OPENGL=1 src: dep/glfw/g/src - dep/glew/glew-${gl.glew.version}/src/glew.c + dep/glew/g/src/glew.c lib: GL - name: dep_get