From 2694539ca38f32f751e28ff993ea58de7dcc124f Mon Sep 17 00:00:00 2001 From: Artem Medvedev Date: Mon, 29 Jul 2024 12:01:36 +0200 Subject: [PATCH] ci: add macos & windows runners for testing --- .github/docker.override.conf | 5 ----- .github/workflows/ci.yml | 33 ++++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 .github/docker.override.conf diff --git a/.github/docker.override.conf b/.github/docker.override.conf deleted file mode 100644 index c86c94b1..00000000 --- a/.github/docker.override.conf +++ /dev/null @@ -1,5 +0,0 @@ -# This is a systemd unit override file that enables the Docker Remote API on localhost. -# To take effect, it should be placed at /etc/systemd/system/docker.service.d/override.conf. -[Service] -ExecStart= -ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 166b4624..8ffb5b7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: CI on: pull_request: @@ -35,33 +35,44 @@ jobs: run: cargo hack build --each-feature --keep-going test: - name: Test - runs-on: ubuntu-latest strategy: fail-fast: false matrix: toolchain: - stable - nightly + os: + - name: Ubuntu + version: ubuntu-latest + - name: Windows + version: windows-latest + - name: MacOS + version: macos-13 + + name: Test - ${{ matrix.os.name }} (${{ matrix.toolchain }}) + runs-on: ${{ matrix.os.version }} + steps: - name: Checkout sources uses: actions/checkout@v4 + # Install NASM on Windows (because of aws-lc-rs requirements) + - uses: ilammy/setup-nasm@v1 + if: ${{ matrix.os.name == 'Windows' }} + - name: Setup Docker (MacOS only) + if: ${{ matrix.os.name == 'MacOS' }} + uses: crazy-max/ghaction-setup-docker@v3 + with: + set-host: true - uses: Swatinem/rust-cache@v2 - - name: Setup Rust + - name: Setup Rust - ${{ matrix.toolchain }} uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - - name: Enable Docker Remote API on Localhost - shell: bash - run: | - sudo mkdir -p /etc/systemd/system/docker.service.d/ - sudo cp ./.github/docker.override.conf /etc/systemd/system/docker.service.d/override.conf - sudo systemctl daemon-reload - sudo systemctl restart docker - uses: taiki-e/install-action@v2 with: tool: cargo-hack - name: Tests + timeout-minutes: 30 run: cargo hack test --each-feature --clean-per-run fmt: