mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 06:23:08 -08:00
Compare commits
4 Commits
dev/karo/s
...
dev/david/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae418ffba7 | ||
|
|
e3f7773bac | ||
|
|
9ab754eb0b | ||
|
|
b055457d01 |
58
.github/workflows/cargo-crev-exemptions-dependabot.yml
vendored
Normal file
58
.github/workflows/cargo-crev-exemptions-dependabot.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: Dependabot Vet Exemptions
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "Cargo.toml"
|
||||||
|
- "Cargo.lock"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependabot-cargo-crev-exceptions:
|
||||||
|
if: github.actor == 'dependabot[bot]' # Run only for Dependabot PRs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }} # Ensure push access
|
||||||
|
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
key: cargo-vet-cache
|
||||||
|
|
||||||
|
- name: Install stable toolchain # Since we are running/compiling cargo-vet, we should rely on the stable toolchain.
|
||||||
|
run: |
|
||||||
|
rustup toolchain install stable
|
||||||
|
rustup default stable
|
||||||
|
|
||||||
|
- uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ runner.tool_cache }}/cargo-vet
|
||||||
|
key: cargo-vet-bin
|
||||||
|
|
||||||
|
- name: Add the tool cache directory to the search path
|
||||||
|
run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Ensure that the tool cache is populated with the cargo-vet binary
|
||||||
|
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet cargo-vet
|
||||||
|
|
||||||
|
- name: Regenerate vet exemptions
|
||||||
|
run: cargo vet regenerate exemptions
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: git diff --exit-code || echo "Changes detected, committing..."
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions@github.com"
|
||||||
|
git add supply-chain./*
|
||||||
|
git commit -m "Regenerate cargo vet exemptions"
|
||||||
|
git push origin ${{ github.head_ref }}
|
||||||
20
.github/workflows/docker.yaml
vendored
20
.github/workflows/docker.yaml
vendored
@@ -135,7 +135,7 @@ jobs:
|
|||||||
|
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.actor }}/rp
|
images: ghcr.io/${{ github.repository_owner }}/rp
|
||||||
labels: |
|
labels: |
|
||||||
maintainer=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
maintainer=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
||||||
org.opencontainers.image.authors=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
org.opencontainers.image.authors=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
||||||
@@ -148,7 +148,7 @@ jobs:
|
|||||||
org.opencontainers.image.source=https://github.com/rosenpass/rosenpass
|
org.opencontainers.image.source=https://github.com/rosenpass/rosenpass
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -161,7 +161,7 @@ jobs:
|
|||||||
file: docker/Dockerfile
|
file: docker/Dockerfile
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: ghcr.io/${{ github.actor }}/rp
|
tags: ghcr.io/${{ github.repository_owner }}/rp
|
||||||
target: rp
|
target: rp
|
||||||
platforms: linux/${{ matrix.arch }}
|
platforms: linux/${{ matrix.arch }}
|
||||||
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
||||||
@@ -199,7 +199,7 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.actor }}/rosenpass
|
images: ghcr.io/${{ github.repository_owner }}/rosenpass
|
||||||
labels: |
|
labels: |
|
||||||
maintainer=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
maintainer=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
||||||
org.opencontainers.image.authors=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
org.opencontainers.image.authors=Karolin Varner <karo@cupdev.net>, wucke13 <wucke13@gmail.com>
|
||||||
@@ -212,7 +212,7 @@ jobs:
|
|||||||
org.opencontainers.image.source=https://github.com/rosenpass/rosenpass
|
org.opencontainers.image.source=https://github.com/rosenpass/rosenpass
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -225,7 +225,7 @@ jobs:
|
|||||||
file: docker/Dockerfile
|
file: docker/Dockerfile
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: ghcr.io/${{ github.actor }}/rosenpass
|
tags: ghcr.io/${{ github.repository_owner }}/rosenpass
|
||||||
target: rosenpass
|
target: rosenpass
|
||||||
platforms: linux/${{ matrix.arch }}
|
platforms: linux/${{ matrix.arch }}
|
||||||
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
|
||||||
@@ -262,7 +262,7 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -271,7 +271,7 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.actor }}/${{ matrix.target }}
|
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}
|
||||||
tags: |
|
tags: |
|
||||||
type=edge,branch=main
|
type=edge,branch=main
|
||||||
type=sha,branch=main
|
type=sha,branch=main
|
||||||
@@ -281,8 +281,8 @@ jobs:
|
|||||||
working-directory: ${{ runner.temp }}/digests
|
working-directory: ${{ runner.temp }}/digests
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
$(printf 'ghcr.io/${{ github.actor }}/${{ matrix.target }}@sha256:%s ' *)
|
$(printf 'ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}@sha256:%s ' *)
|
||||||
|
|
||||||
- name: Inspect image
|
- name: Inspect image
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools inspect ghcr.io/${{ github.actor }}/${{ matrix.target }}:${{ steps.meta.outputs.version }}
|
docker buildx imagetools inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}:${{ steps.meta.outputs.version }}
|
||||||
|
|||||||
@@ -39,13 +39,6 @@ mod tests {
|
|||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_timebase() {
|
|
||||||
let timebase = Timebase::default();
|
|
||||||
let now = timebase.now();
|
|
||||||
assert!(now > 0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_timebase_clone() {
|
fn test_timebase_clone() {
|
||||||
let timebase = Timebase::default();
|
let timebase = Timebase::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user