Update edition to 2021 and use cargo fmt #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build_and_upload: | |
name: Build and archive artifacts | |
runs-on: ${{ matrix.os }} | |
env: | |
CARGO_TERM_COLOR: always | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Get Rust LLVM target triple | |
id: get_target | |
shell: bash | |
run: | | |
echo -n 'name=' >> "${GITHUB_OUTPUT}" | |
RUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json \ | |
| jq -r '."llvm-target"' \ | |
>> "${GITHUB_OUTPUT}" | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Run tests in debug mode | |
env: | |
RUST_BACKTRACE: 1 | |
TERM: xterm | |
run: | | |
cargo clippy --workspace -- -D warnings | |
cargo test --workspace | |
- name: Build in debug mode | |
run: cargo build --verbose | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ddns-updater-${{ steps.get_target.outputs.name }} | |
path: | | |
target/debug/ddns-updater | |
target/debug/ddns-updater.exe | |
target/debug/ddns_updater.pdb |