Skip to content

Commit

Permalink
Merge pull request #4051 from tgross35/stable-ci
Browse files Browse the repository at this point in the history
[0.2] ci: Remove tests with rust < 1.63
  • Loading branch information
tgross35 authored Nov 16, 2024
2 parents 8153ac1 + 6093ce0 commit 01ce562
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 112 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/full_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ jobs:
- stable
- beta
- nightly
# FIXME: Disabled due to:
# error: failed to parse registry's information for: serde
# 1.13.0,
- 1.19.0
- 1.24.0
- 1.25.0
- 1.30.0
- 1.63.0
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
Expand All @@ -57,9 +51,10 @@ jobs:
max-parallel: 4
matrix:
target:
- { toolchain: stable, os: macos-13 }
- { toolchain: beta, os: macos-13 }
- { toolchain: nightly, os: macos-13 }
- { toolchain: stable, os: macos-14 }
- { toolchain: beta, os: macos-14 }
- { toolchain: nightly, os: macos-14 }
- { toolchain: 1.63.0, os: macos-14 }
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -77,10 +72,7 @@ jobs:
fail-fast: true
matrix:
toolchain:
- 1.19.0
- 1.24.0
- 1.25.0
- 1.30.0
- 1.63.0
- stable
steps:
- uses: actions/checkout@v4
Expand All @@ -93,12 +85,12 @@ jobs:

macos:
name: macOS
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: true
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
Expand All @@ -120,6 +112,7 @@ jobs:
ARCH_BITS: 64
ARCH: x86_64
- target: x86_64-pc-windows-msvc
# FIXME: It currently causes segfaults.
#- target: i686-pc-windows-gnu
# env:
# ARCH_BITS: 32
Expand Down Expand Up @@ -220,7 +213,7 @@ jobs:
run: |
export PATH=$HOME/.rust_solaris/bin:$PATH
bash ./ci/run.sh ${{ matrix.target }}
check_cfg:
name: "Check #[cfg]s"
runs-on: ubuntu-22.04
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/main.yml

This file was deleted.

45 changes: 36 additions & 9 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,15 +1143,6 @@ s! {
pub nativeattr: attribute_set_t,
}

#[cfg_attr(libc_packedN, repr(packed(4)))]
pub struct ifconf {
pub ifc_len: ::c_int,
#[cfg(libc_union)]
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
#[cfg(not(libc_union))]
pub ifc_ifcu: *mut ifreq,
}

#[cfg_attr(libc_align, repr(align(8)))]
pub struct tcp_connection_info {
pub tcpi_state: u8,
Expand Down Expand Up @@ -1202,6 +1193,15 @@ s! {
}

s_no_extra_traits! {
#[cfg_attr(libc_packedN, repr(packed(4)))]
pub struct ifconf {
pub ifc_len: ::c_int,
#[cfg(libc_union)]
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
#[cfg(not(libc_union))]
pub ifc_ifcu: *mut ifreq,
}

#[cfg_attr(libc_packedN, repr(packed(4)))]
pub struct kevent {
pub ident: ::uintptr_t,
Expand Down Expand Up @@ -1617,6 +1617,32 @@ cfg_if! {

cfg_if! {
if #[cfg(feature = "extra_traits")] {
impl PartialEq for ifconf
where
Self: Copy
{
fn eq(&self, other: &Self) -> bool {
let len_ptr1 = core::ptr::addr_of!(self.ifc_len);
let len_ptr2 = core::ptr::addr_of!(other.ifc_len);
let ifcu_ptr1 = core::ptr::addr_of!(self.ifc_ifcu);
let ifcu_ptr2 = core::ptr::addr_of!(other.ifc_ifcu);

// SAFETY: `ifconf` implements `Copy` so the reads are valid
let len1 = unsafe { len_ptr1.read_unaligned() };
let len2 = unsafe { len_ptr2.read_unaligned() };
let ifcu1 = unsafe { ifcu_ptr1.read_unaligned() };
let ifcu2 = unsafe { ifcu_ptr2.read_unaligned() };

len1 == len2 && ifcu1 == ifcu2
}
}
impl Eq for ifconf {}
impl ::fmt::Debug for ifconf {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("ifconf").finish_non_exhaustive()
}
}

impl PartialEq for kevent {
fn eq(&self, other: &kevent) -> bool {
self.ident == other.ident
Expand All @@ -1627,6 +1653,7 @@ cfg_if! {
&& self.udata == other.udata
}
}

impl Eq for kevent {}
impl ::fmt::Debug for kevent {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
Expand Down

0 comments on commit 01ce562

Please sign in to comment.