Skip to content

Commit

Permalink
CI: added release workflow action
Browse files Browse the repository at this point in the history
  • Loading branch information
ppaulweber committed Apr 5, 2020
1 parent ea7af2d commit 4214c08
Showing 1 changed file with 205 additions and 0 deletions.
205 changes: 205 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
#
# Copyright (C) 2014-2020 CASM Organization <https://casm-lang.org>
# All rights reserved.
#
# Developed by: Philipp Paulweber
# Emmanuel Pescosta
# <https://github.com/casm-lang/casm>
#
# 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 <http://www.gnu.org/licenses/>.
#

# 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

0 comments on commit 4214c08

Please sign in to comment.