Skip to content

Commit

Permalink
Actually test x64 and add aarch64 tests (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd authored Feb 10, 2025
1 parent 810d728 commit da3841e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ jobs:
fail-fast: false
matrix:
version: ['1.10', 'pre', 'nightly']
os: ['macOS-latest']
arch: [x64]
os: ['macOS-13', 'macOS-latest']
include:
- os: 'macOS-13'
arch: 'x64'
- os: 'macOS-latest'
arch: 'aarch64'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
8 changes: 7 additions & 1 deletion src/ObjectiveC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ The setting is saved in a preference, so is persistent, and requires a restart o
take effect.
"""
function enable_tracing(enabled::Bool)
prev_tracing = @load_preference("tracing", false)::Bool
@set_preferences!("tracing" => enabled)
@info("ObjectiveC.jl tracing setting changed; restart your Julia session for this change to take effect!")
if prev_tracing == enabled
@info("ObjectiveC.jl tracing setting was already `$enabled`; setting not changed.")
else
@info("ObjectiveC.jl tracing setting changed; restart your Julia session for this change to take effect!")
end
return
end
const tracing = @load_preference("tracing", false)::Bool

Expand Down
4 changes: 1 addition & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using ObjectiveC
using Test

using ObjectiveC

@testset "@objc macro" begin
# class methods
@objc [NSString new]::id{Object}
Expand Down Expand Up @@ -568,7 +566,7 @@ end
@testset "tracing" begin
ObjectiveC.enable_tracing(true)
cmd = ```$(Base.julia_cmd()) --project=$(Base.active_project())
--eval "using ObjectiveC, .Foundation; String(NSString())"```
--eval "using ObjectiveC; using .Foundation; String(NSString())"```

out = Pipe()
err = Pipe()
Expand Down

0 comments on commit da3841e

Please sign in to comment.