-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (83 loc) · 2.55 KB
/
continuous-integration.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Continuous Integration
on: [push]
jobs:
build_compiler:
name: Build Compiler
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Compile with Maven
run: mvn --update-snapshots --no-transfer-progress compile
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact-build-compiler
path: |
./target
./pom.xml
./dependency-reduced-pom.xml
if-no-files-found: error
retention-days: 3
test_unit_integration:
name: Unit and Integration Tests
needs: build_compiler
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Test with Maven
run: mvn --update-snapshots --no-transfer-progress test
build_runtime:
name: Build Runtime
needs: test_unit_integration
runs-on: ubuntu-latest
steps:
- name: Get source code
uses: actions/checkout@v2
- name: Build runtime object file
run: gcc -c ./src/runtime/runtime.c -o runtime.o
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifact-build-runtime
path: ./runtime.o
if-no-files-found: error
retention-days: 3
semantic_release:
name: Semantic Release
needs: build_runtime
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Get source code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Install the semantic-release/exec plugin
run: npm install @semantic-release/exec -D
- name: Install the semantic-release/github plugin
run: npm install @semantic-release/github -D
- name: Install the semantic-release/git plugin
run: npm install @semantic-release/git -D
- name: Generate a new release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release@18