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
40 changes: 40 additions & 0 deletions .github/workflows/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: devenv workflow
on:
workflow_call:
inputs:
devenv-target:
required: true
type: string

jobs:
test:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- name: Sccache Action
uses: Mozilla-Actions/sccache-action@main
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
- name: Set up cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: install devenv
run: nix profile install nixpkgs#devenv
- name: run devenv target
run: devenv ${{ inputs.devenv-target }}
17 changes: 17 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pushes and pull requests
on:
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read
id-token: write

jobs:
devenv-test:
uses: ./.github/workflows/devenv.yaml
with:
devenv-target: test --log-format tracing-pretty
10 changes: 3 additions & 7 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ pub struct ForeignInterfacePath {
}

impl ForeignInterfacePath {
pub fn new(
package_name: String,
interface_name: String,
version: Option<Version>,
) -> Self {
pub fn new(package_name: String, interface_name: String, version: Option<Version>) -> Self {
ForeignInterfacePath {
package_name,
interface_name,
version,
}
}

pub fn package_name(&self) -> &str {
self.package_name.as_ref()
}
Expand Down Expand Up @@ -64,7 +60,7 @@ impl InterfacePath {
version,
}
}

pub fn package_name(&self) -> Option<&str> {
self.package_name.as_ref().map(|n| n.as_str())
}
Expand Down
Loading