Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move binaries to jll packages #41

Merged
merged 3 commits into from
Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.jl.*.cov
*.jl.mem
*DS_Store
Manifest.toml
49 changes: 22 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
language: julia

dist: xenial

os:
- linux
- osx

julia:
- 1.3
- nightly

matrix:
include:
- language: julia
julia: 0.7
os: linux
dist: trusty
sudo: false
- language: julia
julia: 1.0
os: linux
dist: trusty
sudo: false
- language: julia
julia: 0.7
os: linux
- language: julia
julia: 1.0
os: linux
- language: julia
julia: 0.7
os: osx
- language: julia
julia: 1.0
os: osx
allow_failures:
julia: nightly

allow_failures:
- os: linux
cache:
directories:
- /home/travis/.julia/artifacts

notifications:
email: false
after_success:
- julia -e 'using Pkg; cd(Pkg.dir("SimpleDirectMediaLayer")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi
- $TESTCMD -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
12 changes: 8 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name = "SimpleDirectMediaLayer"
uuid = "98e33af6-2ee5-5afd-9e75-cbc738b767c4"
repo = "https://github.com/jonathanBieler/SimpleDirectMediaLayer.jl.git"
version = "0.1.1"
version = "0.2.0"

[deps]
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Homebrew = "d9be37ee-ecc9-5288-90f1-b9ca67657a75"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
SDL2_image_jll = "41f3cfe1-fd11-58ad-8074-b9730c29438b"
SDL2_jll = "ab825dc5-c88e-5901-9575-1e5e20358fcf"
SDL2_mixer_jll = "7e88e5ca-120e-58e7-9660-b2187fd466c0"
SDL2_ttf_jll = "ca9d4746-8a27-5104-babe-80f83b336947"

[compat]
julia = "1.3"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
44 changes: 20 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
environment:
matrix:
#- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: 1.3
- julia_version: nightly

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
platform:
- x86 # 32-bit
- x64 # 64-bit

# Uncomment the following lines to allow failures on nightly julia
# (tests will run but not make your overall status red)
matrix:
allow_failures:
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: nightly

branches:
only:
Expand All @@ -23,24 +25,18 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# If there's a newer build queued for the same PR, cancel this one
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "using InteractiveUtils; versioninfo();
using Pkg; Pkg.clone(pwd(), \"SimpleDirectMediaLayer\"); Pkg.build(\"SimpleDirectMediaLayer\");
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia -e "using Pkg; Pkg.test(\"SimpleDirectMediaLayer\")"
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
66 changes: 0 additions & 66 deletions deps/build.jl

This file was deleted.

16 changes: 9 additions & 7 deletions src/SimpleDirectMediaLayer.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
__precompile__()
module SimpleDirectMediaLayer

using SDL2_jll
using SDL2_mixer_jll
using SDL2_image_jll
using SDL2_ttf_jll

Base.@deprecate_binding libSDL2 SimpleDirectMediaLayer.libsdl2 false
Base.@deprecate_binding libSDL2_mixer SimpleDirectMediaLayer.libsdl2_mixer false
Base.@deprecate_binding libSDL2_ttf SimpleDirectMediaLayer.libsdl2_ttf false

using ColorTypes

import Base.unsafe_convert
export TTF_Init, TTF_OpenFont, TTF_RenderText_Blended, TTF_SizeText

const depsfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
if isfile(depsfile)
include(depsfile)
else
error("SimpleDirectMediaLayer not properly installed. Please run Pkg.build(\"SimpleDirectMediaLayer\") then restart Julia.")
end

include("lib/SDL.jl")
include("lib/SDL_ttf.jl")
include("lib/SDL_mixer.jl")
Expand Down
Loading