Skip to content

Commit

Permalink
replace spin deps
Browse files Browse the repository at this point in the history
Signed-off-by: karthik2804 <[email protected]>
  • Loading branch information
karthik2804 committed Sep 23, 2024
1 parent 9941099 commit 0b4aa86
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:
concurrency: ${{ github.workflow }}

env:
PROGRAM_NAME: deps
PROGRAM_NAME: spin-deps

jobs:
lint:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
matrix:
config:
- { target: "x86_64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "amd64", extension: ""}
- { target: "aarch64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "aarch64", extension: "", extraArg: "--features openssl/vendored" }
- { target: "aarch64-unknown-linux-gnu", os: "ubuntu-20.04", arch: "aarch64", extension: "" }
- { target: "x86_64-apple-darwin", os: "macos-13", arch: "amd64", extension: "" }
- { target: "aarch64-apple-darwin", os: "macos-14", arch: "aarch64", extension: "" }
- { target: "x86_64-pc-windows-msvc", os: "windows-latest", arch: "amd64", extension: ".exe" }
Expand All @@ -82,10 +82,12 @@ jobs:
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
echo '[target.aarch64-unknown-linux-gnu]' >> ${HOME}/.cargo/config.toml
echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml
if ! grep -q "\[target.aarch64-unknown-linux-gnu\]" ${HOME}/.cargo/config.toml; then
echo '[target.aarch64-unknown-linux-gnu]' >> ${HOME}/.cargo/config.toml
echo 'linker = "aarch64-linux-gnu-gcc"' >> ${HOME}/.cargo/config.toml
fi
- name: Build plugin binary
run: cargo build --release --target ${{ matrix.config.target }} ${{ matrix.config.extraArg }}
run: cargo build --release --target ${{ matrix.config.target }}
- name: Copy plugin binary to standard location
shell: bash
run: cp target/${{ matrix.config.target }}/release/${{ env.PROGRAM_NAME}}${{ matrix.config.extension }} target/release/${{ env.PROGRAM_NAME}}${{ matrix.config.extension }}
Expand Down
30 changes: 22 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ clap = { version = "4.5.17", features = ["derive"] }
dialoguer = "0.11.0"
reqwest = "0.12.7"
sha2 = "0.10.8"
spin-manifest = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/manifest" }
spin-serde = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/serde" }
spin-loader = { path = "/Users/karthik_ganeshram/Work/fermyon/spin/crates/loader" }
spin-manifest = { git = "https://github.com/fermyon/spin" }
spin-serde = { git = "https://github.com/fermyon/spin" }
spin-loader = { git = "https://github.com/fermyon/spin" }
tokio = { version = "1.40.0", features = ["full"] }
toml = "0.8.19"
toml_edit = "0.22.21"
Expand Down
8 changes: 2 additions & 6 deletions src/commands/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl AddCommand {
for (package_name, interface) in exported_interfaces {
package_interface_map
.entry(package_name)
.or_insert_with(Vec::new)
.or_default()
.push(interface);
}

Expand Down Expand Up @@ -212,11 +212,7 @@ impl AddCommand {
},
AddCommand::Registry(src) => ComponentDependency::Package {
version: src.version.to_string(),
registry: if let Some(registry) = &src.registry {
Some(registry.to_string())
} else {
None
},
registry: src.registry.as_ref().map(|registry| registry.to_string()),
package: Some(src.package.clone().to_string()),
export: None,
},
Expand Down

0 comments on commit 0b4aa86

Please sign in to comment.