Skip to content

Commit

Permalink
Merge branch 'release/0.23.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
turboladen committed May 30, 2024
2 parents 6239161 + b728126 commit b5c87d0
Show file tree
Hide file tree
Showing 202 changed files with 9,342 additions and 5,288 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[registries]
agrian-registry = { index = "ssh://git@github.com/agrian-inc/crates-registry.git" }
agrian-registry = { index = "ssh://git@github.com/telus-agcg/crates-registry.git" }
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "cargo"
directory: "api"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
57 changes: 29 additions & 28 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: Continuous Integration

on:
push:
paths:
- "**/*.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/rust-ci.yml"

env:
CARGO_TERM_COLOR: always
Expand All @@ -12,23 +18,20 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/ssh-agent@ee29fafb6aa450493bac9136b346e51ea60a8b5e
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.MAC_OS_BUILD_AGENT_PRIVATE_KEY }}
${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
ssh-private-key: ${{ secrets.TELUS_AGCG_MACHINE_USER_KEY }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: cargo test all
uses: actions-rs/cargo@v1
with:
Expand All @@ -37,27 +40,25 @@ jobs:

check-ios:
name: Test (x86_64-apple-ios)
runs-on: macos-10.15
runs-on: [self-hosted, macOS, xcode13]
if: ${{ false }} # Disabling till PCC-221
env:
DYLD_ROOT_PATH: '/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
DYLD_ROOT_PATH: "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
steps:
- uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/ssh-agent@ee29fafb6aa450493bac9136b346e51ea60a8b5e
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.MAC_OS_BUILD_AGENT_PRIVATE_KEY }}
${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
ssh-private-key: ${{ secrets.TELUS_AGCG_MACHINE_USER_KEY }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Security audit

on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/security-audit.yml"
workflow_dispatch:
inputs:
tags:
required: false
description: "Security audit"

env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_AGRIAN_REGISTRY_INDEX: ${{ secrets.AGRIAN_CRATES_REGISTRY }}

jobs:
security-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.TELUS_AGCG_MACHINE_USER_KEY }}
- 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') }}
- name: Security audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
30 changes: 14 additions & 16 deletions .github/workflows/upload-release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
name: Upload release

on:
push:
tags:
- '*'
- "*"
workflow_dispatch:
inputs:
tag:
description: 'Git tag'
description: "Git tag"
required: true

env:
Expand All @@ -20,26 +21,23 @@ jobs:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/ssh-agent@ee29fafb6aa450493bac9136b346e51ea60a8b5e
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.MAC_OS_BUILD_AGENT_PRIVATE_KEY }}
${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v2
ssh-private-key: ${{ secrets.TELUS_AGCG_MACHINE_USER_KEY }}
with:
ref: ${{ env.TAG }}
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build wise_units-ffi
run: cargo build --release --package wise_units-ffi
- name: Create Release
Expand Down
17 changes: 11 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[workspace]
members = [
"api",
"atom_generator",
"definition_fetcher",
"ffi",
]
members = ["crates/*"]
resolver = "2"

[workspace.package]
rust-version = "1.64.0"

[workspace.dependencies]
approx = "0.5"
ffi_common = { version = "0.7", registry = "agrian-registry" }
lazy_static = "1.4"
serde = { version = "1.0", features = ["derive"] }
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terms. It's similar to Ruby's [unitwise](https://github.com/joshwlewis/unitwise)

## Prerequisites

- Rust 1.56
- Rust 1.64
- Get it [here](https://rustup.rs/)

## Usage
Expand All @@ -34,6 +34,12 @@ This feature is disabled by default. To enable it:
wise_units = { version = "0.22", features = ["serde"] }
```
### Feature `v2`
The `v2` feature makes some new traits available--traits that are "fixed" versions of existing
traits. Putting these behind this feature flag allows us to try out these new traits in downstream
crates before switching them to be the main traits in `wise_units`.
## Examples
A `Measurement` is made up of some quantifier, the `value`, and the unit of measure,
Expand Down
55 changes: 0 additions & 55 deletions api/benches/measurements_benchmarks.rs

This file was deleted.

Loading

0 comments on commit b5c87d0

Please sign in to comment.