ddns-update-daemon 1.0.1

DynDNS update daemon using UPnP
name: CI

on:
  push:
    branches:
      - master
  pull_request:

env:
  rust_nightly_toolchain: nightly
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
  compile:
    name: ${{ matrix.config.name }}
    runs-on: ${{ matrix.config.os }}
    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: "Windows Latest",
            os: windows-latest,
            rust_toolchain: stable,
            rust_targets: "",
            build_args: "",
            more_checks: false
          }
        - {
            name: "Ubuntu Latest",
            os: ubuntu-latest,
            rust_toolchain: stable,
            rust_targets: "", #"x86_64-unknown-linux-musl",
            build_args: "", #-target x86_64-unknown-linux-musl --features native-tls/vendored,
            more_checks: true
          }
        - {
            name: "macOS Latest",
            os: macos-latest,
            rust_toolchain: stable,
            rust_targets: "",
            build_args: "",
            more_checks: false
          }

    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v4

      - name: Setup | Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.config.rust_toolchain }}
          targets: ${{ matrix.config.rust_targets }}
          components: rustfmt, clippy

      - name: Build | Fmt Check
        if: matrix.config.more_checks
        run: cargo fmt -- --check

      - name: Build | Clippy
        if: matrix.config.more_checks
        run: cargo clippy ${{ matrix.config.build_args }} --no-deps -- -Dwarnings

      - name: Build | Compile
        run: cargo build ${{ matrix.config.build_args }}

      - name: Test
        run: cargo test ${{ matrix.config.build_args }}