Skip to content

Improved mail subject decoding: Added support for Q-encoded words and… #102

Improved mail subject decoding: Added support for Q-encoded words and…

Improved mail subject decoding: Added support for Q-encoded words and… #102

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
linux_x86_64:
name: Linux (x86-64)
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Release Build
run: cargo build --release --all
- name: Execute Tests
run: cargo test --release --all
- name: Run Clippy
run: cargo clippy --release --all --all-targets --all-features --locked -- -D warnings
- name: Check Formatting
run: cargo fmt --all -- --check
- uses: actions/upload-artifact@v4
with:
name: x86_64-linux-gnu
path: target/release/dmarc-report-viewer
linux_aarch64:
name: Linux (AArch64)
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Install Cargo Binary Install
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- name: Install Cargo Cross
run: cargo binstall cross --no-confirm
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Release Build
run: cross build --release --all --target aarch64-unknown-linux-musl
- name: Execute Tests
run: cross test --release --all --target aarch64-unknown-linux-musl
- uses: actions/upload-artifact@v4
with:
name: aarch64-linux-musl
path: target/aarch64-unknown-linux-musl/release/dmarc-report-viewer
windows_x86_64:
name: Windows (x86-64)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install NASM
uses: ilammy/setup-nasm@v1
- name: Update Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Release Build
run: cargo build --release --all
- name: Execute Tests
run: cargo test --release --all
- uses: actions/upload-artifact@v4
with:
name: x86_64-windows
path: target/release/dmarc-report-viewer.exe
mac_x86_64:
name: Mac (x86-64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Install x64 target
run: rustup target add x86_64-apple-darwin
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Release Build
run: cargo build --release --all --target x86_64-apple-darwin
- name: Execute Tests
run: cargo test --release --all --target x86_64-apple-darwin
- uses: actions/upload-artifact@v4
with:
name: x86_64-mac
path: target/x86_64-apple-darwin/release/dmarc-report-viewer
mac_aarch64:
name: Mac (aarch64)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
- name: Release Build
run: cargo build --release --all --target aarch64-apple-darwin
- name: Execute Tests
run: cargo test --release --all --target aarch64-apple-darwin
- uses: actions/upload-artifact@v4
with:
name: aarch64-mac
path: target/aarch64-apple-darwin/release/dmarc-report-viewer
docker_linux_x86_64:
name: Linux Docker (x86-64)
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker Image
run: docker build . --build-arg GITHUB_SHA --build-arg GITHUB_REF_NAME --pull --tag dmarc-report-viewer
- name: Test Docker Image
run: docker run --rm dmarc-report-viewer ./dmarc-report-viewer --help
- name: Publish Latest Docker Image
if: ${{github.ref == 'refs/heads/master'}}
run: |
echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin
docker tag dmarc-report-viewer ghcr.io/${{github.actor}}/dmarc-report-viewer:develop
docker push ghcr.io/${{github.actor}}/dmarc-report-viewer:develop
- name: Publish Tagged Docker Image
if: startsWith(github.ref, 'refs/tags/')
run: |
echo ${{secrets.GITHUB_TOKEN}} | docker login ghcr.io -u ${{github.actor}} --password-stdin
docker tag dmarc-report-viewer ghcr.io/${{github.actor}}/dmarc-report-viewer:latest
docker push ghcr.io/${{github.actor}}/dmarc-report-viewer:latest
docker tag dmarc-report-viewer ghcr.io/${{github.actor}}/dmarc-report-viewer:${{github.ref_name}}
docker push ghcr.io/${{github.actor}}/dmarc-report-viewer:${{github.ref_name}}
- name: Save Docker Image
run: docker save -o dmarc-report-viewer.tar dmarc-report-viewer
- uses: actions/upload-artifact@v4
with:
name: x86_64-linux-docker
path: dmarc-report-viewer.tar
- name: Extract MUSL Binary
run: container_id=$(docker create dmarc-report-viewer) && docker cp "$container_id:/dmarc-report-viewer" ./dmarc-report-viewer && docker rm "$container_id"
- uses: actions/upload-artifact@v4
with:
name: x86_64-linux-musl
path: dmarc-report-viewer
release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: [linux_x86_64, linux_aarch64, windows_x86_64, mac_x86_64, mac_aarch64, docker_linux_x86_64]
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Pack Artifacts for Release
run: |
zip -r x86_64-windows.zip x86_64-windows
zip -r x86_64-linux-gnu.zip x86_64-linux-gnu
zip -r x86_64-linux-musl.zip x86_64-linux-musl
zip -r aarch64-linux-musl.zip aarch64-linux-musl
zip -r x86_64-mac.zip x86_64-mac
zip -r aarch64-mac.zip aarch64-mac
mv x86_64-linux-docker/dmarc-report-viewer.tar x86_64-linux-docker.tar
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
body: Release created automatically from git tag ${{github.ref_name}}, see CHANGELOG.md for more details.
files: |
CHANGELOG.md
LICENSE
x86_64-windows.zip
x86_64-linux-gnu.zip
x86_64-linux-musl.zip
aarch64-linux-musl.zip
x86_64-mac.zip
aarch64-mac.zip
x86_64-linux-docker.tar