Skip to content

Commit

Permalink
Merge branch 'main' into feat-rustcrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
Fethbita committed Oct 7, 2024
2 parents c18af32 + 69b1bf4 commit 8c87371
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 144 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
rustflags = ["-C", "target-feature=-crt-static"]
rustdocflags = ["-C", "target-feature=-crt-static"]
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Docker Image
on:
push:
paths: ['Dockerfile', '.github/workflows/docker-image.yml']
env:
CONTAINER_REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_IMAGE_NAME }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Login to container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- if: github.ref_name == github.event.repository.default_branch
name: Build and push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_IMAGE_NAME }}:latest,${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_IMAGE_NAME }}:${{ github.sha }}
- if: github.ref_name != github.event.repository.default_branch
name: Build and push
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
push: true
tags: ${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_IMAGE_NAME }}:${{ github.sha }}
27 changes: 27 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_NAME }}:latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 #v4.2.0
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test --all-features --verbose
- name: Audit
run: cargo audit
- name: Check rust version in Cargo.toml
run: cargo msrv verify -- cargo check --all-features --tests
- name: Lint
run: cargo clippy -- -D warnings
- name: Build release
run: cargo build --release --verbose
Loading

0 comments on commit 8c87371

Please sign in to comment.