From 5a6df0564eb6fb1873d48c99f279e5b7cc07c73b Mon Sep 17 00:00:00 2001 From: Alexandru Placinta Date: Sat, 28 Oct 2023 09:55:29 +0200 Subject: [PATCH] Add 4th test --- .github/workflows/test_components.yml | 6 +- .github/workflows/test_targets.yml | 57 +++++++++++++++++++ ...olchain.yml => test_toolchain_version.yml} | 0 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test_targets.yml rename .github/workflows/{test_installed_toolchain.yml => test_toolchain_version.yml} (100%) diff --git a/.github/workflows/test_components.yml b/.github/workflows/test_components.yml index c15a1d51..4c2995d5 100644 --- a/.github/workflows/test_components.yml +++ b/.github/workflows/test_components.yml @@ -15,7 +15,6 @@ jobs: uses: actions/checkout@v4 - name: Use myself - id: toolchain uses: ./ with: toolchain: nightly @@ -25,7 +24,7 @@ jobs: components: clippy - name: Test clippy exists - run: cargo clippy -h > /dev/null + run: cargo clippy -V install_in_docker: runs-on: ubuntu-latest @@ -40,7 +39,6 @@ jobs: run: apt-get update && apt-get install -y curl - name: Use myself - id: toolchain uses: ./ with: toolchain: nightly @@ -50,4 +48,4 @@ jobs: components: clippy - name: Test clippy exists - run: cargo clippy -h > /dev/null + run: cargo clippy -V diff --git a/.github/workflows/test_targets.yml b/.github/workflows/test_targets.yml new file mode 100644 index 00000000..2ade89ed --- /dev/null +++ b/.github/workflows/test_targets.yml @@ -0,0 +1,57 @@ +name: CI Test - install stable & nightly +on: + - pull_request +jobs: + install_on_runner: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macOS-latest + - windows-latest + target: + - wasm32-unknown-unknown + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use myself + uses: ./ + with: + toolchain: nightly + profile: minimal + override: true + targets: ${{ matrix.target }} + + - name: Test ${{ matrix.target }} exists + run: | + test $(rustup target list | grep installed | grep -c ${{ matrix.target }}) -eq 1 || (echo "Target ${{ matrix.target }} is not installed" && exit 1) + + install_in_docker: + runs-on: ubuntu-latest + strategy: + matrix: + target: + - wasm32-unknown-unknown + # Docker image, not the GitHub Actions VM + container: ubuntu:latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + # `rustup` will need `curl` or `wget` later + - name: Install packages + run: apt-get update && apt-get install -y curl + + - name: Use myself + uses: ./ + with: + toolchain: nightly + profile: minimal + override: true + targets: ${{ matrix.target }} + + - name: Test ${{ matrix.target }} exists + run: | + test $(rustup target list | grep installed | grep -c ${{ matrix.target }}) -eq 1 || (echo "Target ${{ matrix.target }} is not installed" && exit 1) diff --git a/.github/workflows/test_installed_toolchain.yml b/.github/workflows/test_toolchain_version.yml similarity index 100% rename from .github/workflows/test_installed_toolchain.yml rename to .github/workflows/test_toolchain_version.yml