From 93dd9d4ed4ac3d5539ee2034f7dc08461fa0b64e Mon Sep 17 00:00:00 2001 From: Sunshine Date: Sun, 5 Apr 2020 15:32:25 -0400 Subject: [PATCH] separate build job per OS --- .github/workflows/build_gnu_linux.yml | 22 +++++++++++++++++++ .github/workflows/build_macos.yml | 22 +++++++++++++++++++ .../{build.yml => build_windows.yml} | 4 +--- .github/workflows/cd.yml | 4 +--- README.md | 4 +++- 5 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build_gnu_linux.yml create mode 100644 .github/workflows/build_macos.yml rename .github/workflows/{build.yml => build_windows.yml} (84%) diff --git a/.github/workflows/build_gnu_linux.yml b/.github/workflows/build_gnu_linux.yml new file mode 100644 index 0000000..932816a --- /dev/null +++ b/.github/workflows/build_gnu_linux.yml @@ -0,0 +1,22 @@ +name: GNU/Linux + +on: + push: + branches: [ master ] + +jobs: + build: + + strategy: + matrix: + os: + - ubuntu-latest + rust: + - stable + runs-on: ${{ matrix.os }} + + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build + run: cargo build --all --locked --verbose diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml new file mode 100644 index 0000000..aebd501 --- /dev/null +++ b/.github/workflows/build_macos.yml @@ -0,0 +1,22 @@ +name: macOS + +on: + push: + branches: [ master ] + +jobs: + build: + + strategy: + matrix: + os: + - macos-latest + rust: + - stable + runs-on: ${{ matrix.os }} + + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build + run: cargo build --all --locked --verbose diff --git a/.github/workflows/build.yml b/.github/workflows/build_windows.yml similarity index 84% rename from .github/workflows/build.yml rename to .github/workflows/build_windows.yml index f72f103..3515af6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build_windows.yml @@ -1,4 +1,4 @@ -name: Build +name: Windows on: push: @@ -10,8 +10,6 @@ jobs: strategy: matrix: os: - - ubuntu-latest - - macos-latest - windows-latest rust: - stable diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 73a50cb..cc2211d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,9 +12,7 @@ jobs: - run: git config --global core.autocrlf false - name: Checkout the repository uses: actions/checkout@master - - name: Build the executable - run: cargo build --all --locked - - name: Perform local installation + - name: Build and install the executable run: cargo install --force --locked --path . - uses: Shopify/upload-to-release@1.0.0 with: diff --git a/README.md b/README.md index d506d73..6d49c20 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[![GitHub Actions Build Status](https://github.com/Y2Z/monolith/workflows/Build/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3ABuild) +[![GitHub Actions Build Status for GNU/Linux](https://github.com/Y2Z/monolith/workflows/GNU%2FLinux/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AGNU%2FLinux) +[![GitHub Actions Build Status for macOS](https://github.com/Y2Z/monolith/workflows/macOS/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AmacOS) +[![GitHub Actions Build Status for Windows](https://github.com/Y2Z/monolith/workflows/Windows/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AWindows) ``` ___ ___________ __________ ___________________ ___