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
46 changes: 21 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,52 +45,46 @@ jobs:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: Linux
- os: ubuntu-latest
name: Linux AMD64
target: x86_64-unknown-linux-gnu
cross: false
test: true

- target: x86_64-apple-darwin
os: macos-latest
- os: macos-latest
name: macOS
target: x86_64-apple-darwin
cross: false
test: true

- os: windows-latest
name: Windows
name: Windows AMD64
target: x86_64-pc-windows-msvc
cross: false
test: true

# Disabled because u_int is undefined in freebsd headers
# - os: ubuntu-latest
# name: FreeBSD
# target: x86_64-unknown-freebsd
# cross: true
# test: false

- target: aarch64-linux-android
os: ubuntu-latest
name: Android
cross: true
test: true

- target: aarch64-apple-darwin
os: macos-latest
- os: macos-latest
name: macOS
target: aarch64-apple-darwin
cross: false
test: true

# - os: ubuntu-latest
# name: OpenWrt
# target: aarch64-unknown-linux-gnu
# cross: true
# test: true
# cargo_args: --features "openwrt"
- os: ubuntu-latest
name: Android
target: aarch64-linux-android
cross: true
test: true

# - target: armv7-unknown-linux-gnueabihf
# os: ubuntu-latest
# - os: ubuntu-latest
# name: Linux ARMv7
# target: armv7-unknown-linux-gnueabihf
# cross: true
# test: true

Expand All @@ -110,15 +104,17 @@ jobs:
if: ${{ matrix.cross }}

- name: Build
run: ${{ env.PROGRAM }} build --target=${{ matrix.target }} ${{ matrix.cargo_args }}
run: ${{ env.PROGRAM }} build --target=${{ matrix.target }}

- name: Test
run: ${{ env.PROGRAM }} test --target=${{ matrix.target }} ${{ matrix.cargo_args }}
run: ${{ env.PROGRAM }} test --target=${{ matrix.target }}
if: ${{ matrix.test }}

- name: Run example
if: ${{ !matrix.cross }}
run: cargo run --example info
- uses: actions/upload-artifact@v4
if: ${{ !matrix.cross }}
with:
name: info-${{ matrix.target }}
path: info.txt
path: info.txt
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/target
/Cargo.lock
/info.txt
/info.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cpuinfo-rs title
# cpuinfo-rs

[![Actions Status](https://github.com/Traverse-Research/cpuinfo-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/Traverse-Research/cpuinfo-rs/actions)
[![Latest version](https://img.shields.io/crates/v/cpuinfo-rs.svg?logo=rust)](https://crates.io/crates/cpuinfo-rs)
Expand Down