Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various updates #12

Merged
merged 29 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a1ba6ad
cargo update
codyps Jul 4, 2024
b613e57
flake.nix: add cargo outdated/udeps
codyps Jul 4, 2024
a9998d4
Update deps, drop konst in favor of copying others
codyps Jul 4, 2024
39dd2a2
flake: workaround stdenv bug
codyps Jul 4, 2024
ea7d148
flake: add cargo-deny
codyps Jul 4, 2024
0ac65c8
cleanup tests
codyps Jul 4, 2024
0da95c6
ci: disable cargo-deny for now
codyps Jul 4, 2024
b0b09bd
try to convince ld to keep the build-id section
codyps Jul 4, 2024
e99b4d4
gha: update some action versions
codyps Jul 4, 2024
d8141df
gha: switch to new rust stuff
codyps Jul 4, 2024
a793a4b
tests: fix no-lds test to actually not use the lds snippet
codyps Jul 4, 2024
30676f4
fix spelling
codyps Jul 4, 2024
3d08ce1
align: suppress unused warning so we can run tests more often
codyps Jul 4, 2024
b5c7f79
fixup! align inclusion (need a crazyer cfg-if)
codyps Jul 4, 2024
12811b1
I hate cfg
codyps Jul 4, 2024
8fa755e
start/end/stop needs lds, drop no-lds test
codyps Jul 4, 2024
01c07f5
section inject does not work, drop
codyps Jul 4, 2024
7f17d04
gha: profile not used by rust toolchain installer, drop
codyps Jul 4, 2024
09e51f4
remove broken tests
codyps Jul 4, 2024
2211ce5
windows: repr(C) missing on structure, add
codyps Jul 4, 2024
6857bf7
ci/nix: actually build on mac too
codyps Jul 4, 2024
27c7764
windows: reflow code to reduce indent
codyps Jul 4, 2024
117998b
Revert "try to convince ld to keep the build-id section"
codyps Jul 4, 2024
3bf4df3
ci/nix: explicitly enable build-id
codyps Jul 4, 2024
f41a015
ci: unify triggers
codyps Jul 4, 2024
11a5ed7
ci: include os in key
codyps Jul 4, 2024
bef5369
circleci: update versions
codyps Jul 4, 2024
0c9e34d
circleci: use latest rust version
codyps Jul 4, 2024
a1f871f
ci/nix: enable build-id manually on ubuntu, not macos
codyps Jul 4, 2024
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2.1
orbs:
rust: circleci/rust@1.6.0
rust: circleci/rust@1.6.1

workflows:
production:
jobs:
- rust/lint-test-build:
release: true
version: 1.56.1
version: 1.79.0
70 changes: 21 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: ci
on:
push:
branches-ignore:
- '**.tmp'
branches:
- "master"
tags:
- "*"
pull_request:

jobs:
build:
name: Build and test
Expand All @@ -13,96 +17,64 @@ jobs:
rust_version: [beta]
env:
BUILD_ID_LEN: 20
RUST_LOG: trace
RUST_LOG: debug
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
profile: minimal
components: clippy

- uses: Swatinem/rust-cache@v1

- run: cargo install cargo-hack

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: hack
args: --feature-powerset clippy -- -D warnings
run: cargo hack --feature-powerset clippy -- -D warnings

- name: Build
# NOTE: we don't feature-powerset here because we need to provide
# symbols for some of the specific lookup mechanisms
# NOTE: we don't build the entire workspace because
# buildid-linker-symbols does not work on all platforms (for example,
# it fails on macos)
uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets
run: cargo build --all-targets

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets

- name: Test (GNU extras)
uses: actions-rs/cargo@v1
if: ${{ matrix.os }} == ubuntu-latest
with:
command: test
args: -p buildid-tests-linker-symbols
run: cargo test --all-targets

check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: beta
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- run: cargo fmt --all -- --check
- run: cargo clippy --all --all-targets -- -D warnings

test-specific:
env:
RUST_LOG: trace
RUST_LOG: debug
strategy:
matrix:
os: [ubuntu-latest]
rust_version: [beta]
script: [test-gnu-ld, test-gnu-ld-section-inject, test-gnu-ld-symbol-start-end, test-gnu-ld-symbol-start-end-no-lds]
script: [test-gnu-ld, test-gnu-ld-symbol-start-end]

runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust_version }}
profile: minimal

- uses: Swatinem/rust-cache@v1

- run: ./scripts/${{ matrix.script }}
18 changes: 12 additions & 6 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: check with nix

on:
push:
branches:
- "master"
tags:
- "*"
pull_request:

jobs:
Expand All @@ -24,10 +28,6 @@ jobs:
run: |
nix develop --command \
cargo fmt --check
- name: Audit Rust code
run: |
nix develop --command \
cargo-deny check
- name: editorconfig check
run: |
nix develop --command \
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: git checkout
uses: actions/checkout@v4
Expand All @@ -61,8 +61,14 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ matrix.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Test
if: "matrix.os == 'ubuntu-22.04'"
run: |
nix develop --command \
env RUSTFLAGS="-Clink-arg=-Wl,--build-id" cargo test
- name: Test
if: "matrix.os != 'ubuntu-22.04'"
run: |
nix develop --command \
cargo test
Loading