From 4214c088a66a7a8eed360de1cb7e39b8e04dca7f Mon Sep 17 00:00:00 2001 From: Philipp Paulweber Date: Sun, 5 Apr 2020 14:28:55 +0200 Subject: [PATCH] CI: added release workflow action --- .github/workflows/release.yml | 205 ++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8365182 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,205 @@ +# +# Copyright (C) 2014-2020 CASM Organization +# All rights reserved. +# +# Developed by: Philipp Paulweber +# Emmanuel Pescosta +# +# +# This file is part of casm. +# +# casm is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# casm is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with casm. If not, see . +# + +# https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments + +name: release + +on: + create: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +jobs: + linux-x86_64: + runs-on: ubuntu-18.04 + strategy: + matrix: + tool: + - build: release + chain: gcc + env: + B: ${{ matrix.tool.build }} + C: ${{ matrix.tool.chain }} + G: ninja + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup + run: | + make info + sudo apt-get update + sudo apt-get install -y ninja-build + make ci-tools + - name: Fetching + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + make ci-fetch + - name: Dependencies + run: | + make ci-deps + - name: Building + run: | + make ci-build + - name: Tests + run: | + make ci-test + - name: Benchmark + run: | + make ci-benchmark + - name: Installation + run: | + make ci-install + - name: Bundling + run: | + make ci-bundle + - name: Persisting + uses: actions/upload-artifact@v1 + with: + name: linux + path: obj/bundle + + darwin-x86_64: + runs-on: macos-latest + strategy: + matrix: + tool: + - build: release + chain: gcc + env: + B: ${{ matrix.tool.build }} + C: ${{ matrix.tool.chain }} + G: ninja + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup + run: | + make info + brew install ninja + brew install gcc@9 + ln -s /usr/local/bin/gcc-9 /usr/local/bin/gcc + ln -s /usr/local/bin/g++-9 /usr/local/bin/g++ + make ci-tools + - name: Fetching + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + make ci-fetch + - name: Dependencies + run: | + make ci-deps + - name: Building + run: | + make ci-build + - name: Tests + run: | + make ci-test + - name: Benchmark + run: | + make ci-benchmark + - name: Installation + run: | + make ci-install + - name: Bundling + run: | + make ci-bundle + - name: Persisting + uses: actions/upload-artifact@v1 + with: + name: darwin + path: obj/bundle + + windows-x86_64: + runs-on: windows-2019 + strategy: + matrix: + tool: + - build: release + chain: gcc + env: + B: ${{ matrix.tool.build }} + C: ${{ matrix.tool.chain }} + G: ninja + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup + run: | + make info + choco install ninja + choco install zip + make ci-tools + - name: Fetching + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + make ci-fetch + - name: Dependencies + run: | + make ci-deps + - name: Building + run: | + make ci-build + - name: Tests + run: | + make ci-test + - name: Benchmark + run: | + make ci-benchmark + - name: Installation + run: | + make ci-install + - name: Bundling + run: | + make ci-bundle + - name: Persisting + uses: actions/upload-artifact@v1 + with: + name: windows + path: obj/bundle + + publish: + needs: + - linux-x86_64 + - darwin-x86_64 + - windows-x86_64 + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup + run: | + mkdir .attic + - name: Fetching + uses: actions/download-artifact@v1 + with: + name: bundle + path: .attic + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ".attic/**" + draft: false