Skip to content

Commit fd3c4d6

Browse files
chore: Restructure the directory layout of the repository
1 parent bd366f4 commit fd3c4d6

File tree

1,651 files changed

+228
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,651 files changed

+228
-281
lines changed

.github/ci_generator/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# We don't want to include this generator in
2+
# the "root" workspace
3+
[workspace]
4+
15
[package]
26
name = "ci_utils"
37
version = "0.1.0"
File renamed without changes.
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use std::sync::Arc;
22

33
use minijinja::{
4-
Environment, context,
4+
context,
55
syntax::SyntaxConfig,
66
value::{Enumerator, Object},
7+
Environment,
78
};
89

910
pub fn pavex_path(target: &str) -> String {
@@ -66,16 +67,15 @@ fn main() {
6667

6768
// Process library crates with service dependencies
6869
let libs_with_deps = {
69-
// Find all directories under `libs` with a `.github/services.yml` file inside.
70-
let entries = std::fs::read_dir("../libs").expect("Failed to find the libs folder");
70+
// Find all directories under `runtime` with a `.github/services.yml` file inside.
71+
let mut entries = std::fs::read_dir("../../runtime")
72+
.expect("Failed to find the folder for runtime libraries")
73+
.collect::<Vec<_>>();
7174
let mut libs_with_deps = vec![];
72-
for entry in entries {
73-
let Ok(entry) = entry else {
74-
continue;
75-
};
75+
while let Some(Ok(entry)) = entries.pop() {
7676
let type_ = entry.file_type().expect("Failed to get file type");
77-
if !type_.is_dir() {
78-
continue;
77+
if type_.is_dir() && !entry.path().join("Cargo.toml").exists() {
78+
entries.extend(std::fs::read_dir(entry.path()).expect("Failed to read directory"));
7979
}
8080
let name = entry.file_name().into_string().expect("Non UTF-8 dir name");
8181
let services = entry.path().join(".github").join("services.yml");
@@ -105,7 +105,8 @@ fn main() {
105105

106106
// Process examples
107107
let examples: Vec<_> = {
108-
let entries = std::fs::read_dir("../examples").expect("Failed to find the examples folder");
108+
let entries =
109+
std::fs::read_dir("../../examples").expect("Failed to find the examples folder");
109110
let mut examples = vec![];
110111
for entry in entries {
111112
let Ok(entry) = entry else {

ci_utils/templates/job_steps/build_clis.jinja renamed to .github/ci_generator/templates/job_steps/build_clis.jinja

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
<% block inner_steps %>
33
- name: Install Rust
44
uses: actions-rust-lang/[email protected]
5-
with:
6-
cache-workspaces: "./libs -> ./target"
75
- name: Build CLI
86
run: |
9-
cd libs
107
cargo build --bin pavex --bin pavexc --release
118
- name: Store pavex CLI artifact
129
uses: actions/upload-artifact@v4
1310
with:
1411
name: pavex_cli_<< target >>
15-
path: libs/target/release/pavex<< binary_extension >>
12+
path: target/release/pavex<< binary_extension >>
1613
- name: Store pavexc CLI artifact
1714
uses: actions/upload-artifact@v4
1815
with:
1916
name: pavexc_cli_<< target >>
20-
path: libs/target/release/pavexc<< binary_extension >>
17+
path: target/release/pavexc<< binary_extension >>
2118
<%- endblock %>

ci_utils/templates/job_steps/build_docs.jinja renamed to .github/ci_generator/templates/job_steps/build_docs.jinja

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
<% block inner_steps %>
33
- name: Install Rust stable toolchain
44
uses: actions-rust-lang/[email protected]
5-
with:
6-
cache-workspaces: "./libs -> ./target"
75
- name: Build API reference
86
run: |
9-
cd libs
107
cargo api_ref
118
- name: Copy API reference files
129
run: |
1310
mkdir -p docs/api_reference
14-
cp -r libs/target/doc/* docs/api_reference
11+
cp -r target/doc/* docs/api_reference
1512
- name: Set up QEMU
1613
uses: docker/setup-qemu-action@v3
1714
- name: Set up Docker Buildx

0 commit comments

Comments
 (0)