diff --git a/.drone.yml b/.drone.yml index 2607e25..be0eae9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,3 +11,30 @@ steps: image: julia:1.5 commands: - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'" + +--- +kind: pipeline +name: linux - arm - Julia 1.6 +platform: + os: linux + arch: arm + +steps: +- name: build + image: julia:1.6 + commands: + - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'" + +--- +kind: pipeline +name: linux - arm64 - Julia 1.6 + +platform: + os: linux + arch: arm64 + +steps: +- name: build + image: julia:1.6 + commands: + - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65063c3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI +on: + - push + - pull_request +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.5' + - 'nightly' + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + - x86 + exclude: + - os: macOS-latest + arch: x86 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index 0af4980..b209a69 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,7 @@ authors = ["ScottPJones "] keywords = ["Strings"] license = "MIT" uuid = "e79e7a6a-7bb1-5a4d-9d64-da657b06f53a" -version = "1.0.5" +version = "1.1.0" [deps] Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" diff --git a/src/utf8.jl b/src/utf8.jl index 71b07b1..4300d27 100644 --- a/src/utf8.jl +++ b/src/utf8.jl @@ -213,7 +213,7 @@ is_ascii(str::SubString{<:Str{C}}) where {C<:ASCII_Union} = is_ascii(vec::Vector{T}) where {T<:CodeUnitTypes} = (cnt = sizeof(vec)) == 0 || - (@preserve str _check_mask_ul(pointer(vec), cnt, _ascii_mask(T))) + (@preserve vec _check_mask_ul(pointer(vec), cnt, _ascii_mask(T))) is_ascii(str::Str{C}) where {C<:ASCII_Union} = (cnt = sizeof(str)) == 0 ||