Skip to content

Commit

Permalink
Merge pull request #64 from musm/up
Browse files Browse the repository at this point in the history
Switch CI to GH actions
  • Loading branch information
SimonDanisch authored May 1, 2021
2 parents f9b16f0 + 434340a commit 99af1a8
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 84 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches:
- master
tags: '*'
pull_request:

jobs:
test:
name: julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.3'
- '1'
- 'nightly'
os:
- ubuntu-latest
- windows-latest
arch:
- x64
include:
- os: ubuntu-latest
prefix: xvfb-run
- os: windows-latest
version: '1'
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
with:
prefix: ${{ matrix.prefix }}
14 changes: 14 additions & 0 deletions .github/workflows/RegisterAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: RegisterAction
on:
workflow_dispatch:
inputs:
version:
description: Version to register or component to bump
required: true
jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/RegisterAction@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
deps/deps.jl
deps/build.log
Manifest.toml
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

41 changes: 20 additions & 21 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
The ModernGL.jl package is licensed under the MIT "Expat" License:
The MIT License (MIT)
Copyright (c) 2014: Simon Danisch.

> Copyright (c) 2014: Simon Danisch.
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

8 changes: 4 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
debug_level = get(ENV, "MODERNGL_DEBUGGING", "false") == "true"
open(joinpath(@__DIR__, "deps.jl"), "w") do io
println(io, "const enable_opengl_debugging = $debug_level")
end
debug_level = lowercase(get(ENV, "MODERNGL_DEBUGGING", "false")) == "true"
open(joinpath(@__DIR__, "deps.jl"), "w") do io
println(io, "const enable_opengl_debugging = $debug_level")
end
9 changes: 3 additions & 6 deletions src/ModernGL.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module ModernGL

using Libdl
const iswindows = Sys.iswindows
const isunix = Sys.isunix
const isapple = Sys.isapple

function glXGetProcAddress(glFuncName)
ccall((:glXGetProcAddress, "libGL.so.1"), Ptr{Cvoid}, (Ptr{UInt8},), glFuncName)
Expand All @@ -23,13 +20,13 @@ function wglGetProcAddress(glFuncName)
ccall((:wglGetProcAddress, "opengl32"), Ptr{Cvoid}, (Ptr{UInt8},), glFuncName)
end

if isapple()
if Sys.isapple()
getprocaddress(glFuncName) = NSGetProcAddress(glFuncName)
elseif isunix()
elseif Sys.isunix()
getprocaddress(glFuncName) = glXGetProcAddress(glFuncName)
end

if iswindows()
if Sys.iswindows()
getprocaddress(glFuncName) = wglGetProcAddress(glFuncName)
end

Expand Down
6 changes: 3 additions & 3 deletions src/functionloading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ macro glfunc(opengl_func)
func_name_str = string(func_name)
ptr_expr = :(getprocaddress_e($func_name_str))

if iswindows() # windows has some function pointers statically available and some not, this is how we deal with it:
if Sys.iswindows() # windows has some function pointers statically available and some not, this is how we deal with it:
ptr = Libdl.dlsym_e(gl_lib, func_name)
if (ptr != C_NULL)
ptr_expr = :(($func_name_sym, "opengl32"))
Expand Down Expand Up @@ -70,12 +70,12 @@ macro glfunc(opengl_func)
return esc(ret)
end

if iswindows()
if Sys.iswindows()
const gl_lib = Libdl.dlopen("opengl32")
end

include("glFunctions.jl")

if iswindows()
if Sys.iswindows()
Libdl.dlclose(gl_lib)
end
4 changes: 1 addition & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import GLFW
using ModernGL
include("util.jl")

function is_ci()
get(ENV, "TRAVIS", "") == "true" || get(ENV, "APPVEYOR", "") == "True" || get(ENV, "CI", "") == "True"
end
is_ci() = lowercase(get(ENV, "CI", "false")) == "true"

if !is_ci() # only do test if not CI... this is for automated testing environments which fail for OpenGL stuff, but I'd like to test if at least including works

Expand Down

0 comments on commit 99af1a8

Please sign in to comment.