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

[do not merge] get build artifact for freebsd #78357

Closed
wants to merge 10 commits into from
Closed
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
env:
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
os: ubuntu-latest-xl
- name: dist-x86_64-freebsd
os: ubuntu-latest-xl
env: {}
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
steps:
Expand Down Expand Up @@ -635,7 +638,7 @@ jobs:
strategy:
matrix:
include:
- name: dist-x86_64-linux
- name: dist-x86_64-freebsd
os: ubuntu-latest-xl
env: {}
timeout-minutes: 600
Expand Down
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
url = https://github.com/rust-analyzer/rust-analyzer.git
[submodule "library/backtrace"]
path = library/backtrace
url = https://github.com/rust-lang/backtrace-rs.git
url = https://github.com/lzutao/backtrace-rs.git
branch = bsd
5 changes: 2 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1707,9 +1707,8 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"

[[package]]
name = "libc"
version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
version = "0.2.80"
source = "git+https://github.com/lzutao/rust-libc?branch=i78184#624f53143a942e45b1f50d9690191e2543db8ef8"
dependencies = [
"rustc-std-workspace-core",
]
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ object.debug = 0
[patch."https://github.com/rust-lang/cargo"]
cargo = { path = "src/tools/cargo" }

[patch.crates-io.libc]
git = "https://github.com/lzutao/rust-libc"
branch = "i78184"

[patch."https://github.com/rust-lang/rustfmt"]
# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt`
# that we're shipping as well (to ensure that the rustfmt in RLS and the
Expand Down
2 changes: 1 addition & 1 deletion library/backtrace
5 changes: 4 additions & 1 deletion src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ jobs:
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
<<: *job-linux-xl

- name: dist-x86_64-freebsd
<<: *job-linux-xl
auto:
<<: *base-ci-job
name: auto
Expand Down Expand Up @@ -679,7 +681,8 @@ jobs:
strategy:
matrix:
include:
- *dist-x86_64-linux
- name: dist-x86_64-freebsd
<<: *job-linux-xl

master:
name: master
Expand Down
14 changes: 12 additions & 2 deletions src/tools/tidy/src/extdeps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use std::fs;
use std::path::Path;

/// List of allowed sources for packages.
const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crates.io-index\""];
const ALLOWED_SOURCES: &[&str] = &[
"\"registry+https://github.com/rust-lang/crates.io-index\"",
"\"git+https://github.com/lzutao/rust-libc",
];

/// Checks for external package sources. `root` is the path to the directory that contains the
/// workspace `Cargo.toml`.
Expand All @@ -26,7 +29,14 @@ pub fn check(root: &Path, bad: &mut bool) {
let source = line.splitn(2, '=').nth(1).unwrap().trim();

// Ensure source is allowed.
if !ALLOWED_SOURCES.contains(&&*source) {
let mut matched = false;
for allowed in ALLOWED_SOURCES {
if source.starts_with(allowed) {
matched = true;
break;
}
}
if !matched {
println!("invalid source: {}", source);
*bad = true;
}
Expand Down