Skip to content

Commit 1efdb1c

Browse files
authored
Merge pull request #10 from JuliaString/spj/fixamb
Fix ambiguity caused by changes to Base Julia, update CI for v1.6
2 parents 0a436e9 + 7d7c40e commit 1efdb1c

File tree

5 files changed

+75
-36
lines changed

5 files changed

+75
-36
lines changed

.drone.yml

+27
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,30 @@ steps:
1111
image: julia:1.5
1212
commands:
1313
- "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"
14+
15+
---
16+
kind: pipeline
17+
name: linux - arm - Julia 1.6
18+
platform:
19+
os: linux
20+
arch: arm
21+
22+
steps:
23+
- name: build
24+
image: julia:1.6
25+
commands:
26+
- "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"
27+
28+
---
29+
kind: pipeline
30+
name: linux - arm64 - Julia 1.6
31+
32+
platform:
33+
os: linux
34+
arch: arm64
35+
36+
steps:
37+
- name: build
38+
image: julia:1.6
39+
commands:
40+
- "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'"

.github/workflows/ci.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
version:
13+
- '1.5'
14+
- '1.6'
15+
- 'nightly'
16+
os:
17+
- ubuntu-latest
18+
- macOS-latest
19+
- windows-latest
20+
arch:
21+
- x64
22+
- x86
23+
exclude:
24+
- os: macOS-latest
25+
arch: x86
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: julia-actions/setup-julia@v1
29+
with:
30+
version: ${{ matrix.version }}
31+
arch: ${{ matrix.arch }}
32+
- uses: actions/cache@v1
33+
env:
34+
cache-name: cache-artifacts
35+
with:
36+
path: ~/.julia/artifacts
37+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38+
restore-keys: |
39+
${{ runner.os }}-test-${{ env.cache-name }}-
40+
${{ runner.os }}-test-
41+
${{ runner.os }}-
42+
- uses: julia-actions/julia-buildpkg@v1
43+
- uses: julia-actions/julia-runtest@v1

.travis.yml

-34
This file was deleted.

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ keywords = ["Characters"]
44
license = "MIT"
55
desc = "Basic functionality for Chr type"
66
authors = ["ScottPJones <[email protected]>"]
7-
version = "1.0.2"
7+
version = "1.0.3"
88

99
[deps]
1010
Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

src/core.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ rem(x::Chr, ::Type{T}) where {T<:Chr} = (x.v)%T
7979
rem(x::Chr, ::Type{T}) where {T<:Char} = (x.v)%T
8080
rem(x::Chr, ::Type{T}) where {T<:Number} = (x.v)%T
8181

82-
(::Type{S})(v::T) where {S<:Union{UInt32, Int, UInt}, T<:Chr} = codepoint(v)%S
82+
(::Type{UInt32})(v::Chr) = codepoint(v)%UInt32
83+
(::Type{UInt64})(v::Chr) = codepoint(v)%UInt64
84+
(::Type{Int32})(v::Chr) = codepoint(v)%Int32
85+
(::Type{Int64})(v::Chr) = codepoint(v)%Int64
8386
(::Type{Char})(v::Chr) = Char(codepoint(v))
8487
(::Type{T})(v::Char) where {T<:Chr} = T(codepoint(v))
8588

0 commit comments

Comments
 (0)