Skip to content

1

1 #1279

Workflow file for this run

# 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 <[email protected]>
# 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