Skip to content
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
29 changes: 7 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ on:
pull_request:

jobs:
oldest_xcode:
strategy:
fail-fast: false
matrix:
version:
- '1.33.0'
- stable
runs-on: macos-10.15
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '10.3.0'
- run: TARGET=x86_64-apple-darwin RUST_VERSION=${{ matrix.version }} ci/run.sh

old_xcode:
strategy:
fail-fast: false
Expand All @@ -29,11 +14,10 @@ jobs:
- '1.33.0'
- stable
xcode-version:
- '11.7.0'
- '12.5.1'
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode-version }}
Expand All @@ -45,9 +29,10 @@ jobs:
matrix:
version:
- '13.4.1'
- '14.2.0'
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.version }}
Expand All @@ -64,19 +49,19 @@ jobs:
- x86_64-apple-ios
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.4.1'
xcode-version: '14.2.0'
- run: TARGET=${{ matrix.target }} RUST_VERSION=nightly NOCTEST=1 NORUN=1 ci/run.sh

style_check:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.4.1'
xcode-version: '14.2.0'
- run: rustup component add rustfmt clippy
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace -- -D warnings
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: macos-12

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure rustup
run: |
Expand Down
13 changes: 11 additions & 2 deletions mach-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ fn main() {
.header("mach/host_special_ports.h")
.header("mach/kern_return.h")
.header("mach/kmod.h")
.header("mach/lock_set.h")
.header("mach/mach.h")
.header("mach/mach_error.h")
.header("mach/mach_host.h")
Expand Down Expand Up @@ -104,7 +103,6 @@ fn main() {
.header("mach/sync_policy.h")
.header("mach/task.h")
.header("mach/task_info.h")
// .header("mach/task_inspect.h");
.header("mach/task_policy.h")
.header("mach/task_special_ports.h")
.header("mach/thread_act.h")
Expand All @@ -130,6 +128,11 @@ fn main() {
.header("mach/vm_task.h")
.header("mach/vm_types.h");

// The below doesn't exist in Xcode 14:
if xcode < Xcode(14, 0) {
cfg.header("mach/lock_set.h");
}

cfg.skip_struct(move |s| {
match s {
// TODO: this type is a bitfield and must be verified by hand
Expand Down Expand Up @@ -166,6 +169,9 @@ fn main() {
// FIXME: Changed in XCode 11, see `vm_region_submap_info_data_64`'s comment.
"vm_region_submap_info_data_64_t" if xcode >= Xcode(11, 0) => true,

// FIXME: Unavailable since Xcode 14:
"io_master_t" if xcode >= Xcode(14, 0) => true,

_ => false,
}
});
Expand All @@ -187,6 +193,9 @@ fn main() {
// bad VM_PROT_NO_CHANGE value at byte 0: rust: 8 (0x8) != c 0 (0x0)
// bad VM_PROT_NO_CHANGE value at byte 3: rust: 0 (0x0) != c 1 (0x1)
"VM_PROT_NO_CHANGE" if xcode >= Xcode(13, 0) => true,

// FIXME: Unavailable since Xcode 14:
"EXC_CORPSE_VARIANT_BIT" if xcode >= Xcode(14, 0) => true,
_ => false,
});

Expand Down