-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (54 loc) · 1.67 KB
/
compilation.yml
File metadata and controls
65 lines (54 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
pull_request:
repository_dispatch:
types: [run_build, run_release]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install Ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get -y install texinfo bison flex findutils ninja-build
- name: Install Mac dependencies
if: matrix.os == 'macOS-latest'
run: |
brew update
brew install texinfo bison flex ninja
- name: Runs all the stages in the shell
run: |
export ORBISDEV=$PWD/orbisdev
export PATH=$ORBISDEV/bin:$PATH
./toolchain.sh
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Compress orbisdev folder
run: |
tar -zcvf orbisdev.tar.gz orbisdev
- uses: actions/upload-artifact@v2
with:
name: orbisdev-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
path: orbisdev.tar.gz
- name: Rename orbisdev.tar.gz file
run: |
mv orbisdev.tar.gz orbisdev-${{matrix.os}}.tar.gz
- name: Extract tag name
if: startsWith(github.ref, 'refs/tags/')
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: orbisdev-${{matrix.os}}.tar.gz
tag_name: ${{ steps.tag.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}