-
-
Notifications
You must be signed in to change notification settings - Fork 417
129 lines (108 loc) · 3.73 KB
/
build.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# This file is a part of Simple-XX/SimpleKernel (https://github.com/Simple-XX/SimpleKernel).
#
# build.yml for Simple-XX/SimpleKernel.
name: build
on:
- push
- pull_request
- release
env:
BUILD_TYPE: Release
jobs:
build_osx:
runs-on: macos-latest
steps:
- name: get code
uses: actions/checkout@v2
- name: setup toolchain
shell: bash
run: |
brew install x86_64-elf-gcc
brew tap riscv-software-src/riscv
brew install riscv-tools
- name: make build dir
shell: bash
run: |
mkdir ${{github.workspace}}/build
- name: osx-i386
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 ..
make
rm -rf ./*
- name: osx-x86_64
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX=x86_64-elf- -DCMAKE_C_COMPILER=x86_64-elf-gcc -DCMAKE_CXX_COMPILER=x86_64-elf-g++ -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 ..
make
rm -rf ./*
- name: osx-riscv64
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX=riscv64-unknown-elf- -DCMAKE_C_COMPILER=riscv64-unknown-elf-gcc -DCMAKE_CXX_COMPILER=riscv64-unknown-elf-g++ -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE -DHAVE_FLAG_SEARCH_PATHS_FIRST=0 ..
make
rm -rf ./*
build_ubuntu:
runs-on: ubuntu-latest
needs: [build_osx]
steps:
- name: get code
uses: actions/checkout@v2
- name: setup toolchain
shell: bash
run: |
sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
- name: make build dir
shell: bash
run: |
mkdir ${{github.workspace}}/build
- name: ubuntu-i386
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX= -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DARCH=i386 -DCMAKE_BUILD_TYPE=RELEASE ..
make
rm -rf ./*
- name: ubuntu-x86_64
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX= -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DARCH=x86_64 -DCMAKE_BUILD_TYPE=RELEASE ..
make
rm -rf ./*
- name: ubuntu-riscv64
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake -DTOOLCHAIN_PREFIX=riscv64-linux-gnu- -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-g++ -DARCH=riscv64 -DCMAKE_BUILD_TYPE=RELEASE ..
make
rm -rf ./*
# build_win:
# runs-on: windows-latest
# auto_pr:
# runs-on: ubuntu-latest
# needs: [build_osx]
# steps:
# - name: get code
# uses: actions/checkout@v2
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# token: ${{ secrets.PAT }}
# commit-message: "[Auto PR]"
# committer: GitHub <noreply@github.com>
# author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
# signoff: true
# branch: test-patches
# delete-branch: true
# title: '[BOT] Auto PR'
# body: |
# Auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
# labels: |
# Auto PR
# assignees: MRNIU
# reviewers: MRNIU
# draft: false