Skip to content

Commit

Permalink
Merge branch 'master' into unmangle-newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
bsousi5 authored May 20, 2020
2 parents ee13713 + c6d4972 commit e0f23f2
Show file tree
Hide file tree
Showing 31 changed files with 1,702 additions and 102 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
on:
push:
# Require one of the following patterns to match the tag
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+' # ex. v20.00.00.00
- 'v[0-9]+.[0-9]+.RC.[0-9]+' # ex. v20.00.RC.00

name: Create Release

env:
PROJECT_NAME: freedom-metal
# Release is a prerelease if the tag contains rc
PRERELEASE: ${{ contains(github.ref, 'RC') }}

jobs:
release:
runs-on: ubuntu-latest

steps:
# Perform a recursive, PAT-authenticated checkout of all freedom-metal
# submodules. This allows us to update the published docs on github.io.
- name: 'Checkout'
uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

# In order to generate release notes, we need a deep clone of the
# repository so that we can find the most recent tag and generate
# statistics based on it.
- name: 'Fetch History'
run: git fetch --prune --unshallow

- name: 'Create Release Notes'
uses: sifive/action-release-notes@v1
id: create-release-notes
with:
project-name: ${{ env.PROJECT_NAME }}
release: ${{ github.ref }}

- name: 'Create Release'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.PROJECT_NAME }} ${{ github.ref }}
body: ${{ steps.create-release-notes.outputs.release-notes }}
draft: false
prerelease: ${{ env.PRERELEASE }}

- name: 'Build Docker Image for Docs Build'
run: |
docker build -t docs-build -f doc/Dockerfile .
- name: 'Clean Docs Output Folder'
run: |
cd doc/html
git fetch
git checkout master
git reset --hard origin/master
- name: 'Build Sphinx Documentation'
run: |
tag=$(echo ${{ github.ref }} | cut -d '/' -f 3)
docker run \
--rm \
-v $(pwd):/freedom-metal \
-e RELEASE_TAG="${tag}" \
docs-build \
make -C /freedom-metal/doc clean html
- name: 'Publish Documentation'
run: |
tag=$(echo ${{ github.ref }} | cut -d '/' -f 3)
cd doc/html
git config user.email "no-reply@sifive.com"
git config user.name "actions-bot"
git add .
git commit -m "Documentation for ${{ env.PROJECT_NAME }} ${tag}"
git push
30 changes: 30 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ nobase_include_HEADERS += \
metal/drivers/riscv_clint0.h \
metal/drivers/riscv_cpu.h \
metal/drivers/riscv_plic0.h \
metal/drivers/sifive_buserror0.h \
metal/drivers/sifive_ccache0.h \
metal/drivers/sifive_clic0.h \
metal/drivers/sifive_fe310-g000_hfrosc.h \
Expand All @@ -59,6 +60,7 @@ nobase_include_HEADERS += \
metal/drivers/sifive_test0.h \
metal/drivers/sifive_trace.h \
metal/drivers/sifive_uart0.h \
metal/drivers/sifive_simuart0.h \
metal/drivers/sifive_wdog0.h \
metal/drivers/ucb_htif0.h \
metal/atomic.h \
Expand All @@ -69,6 +71,7 @@ nobase_include_HEADERS += \
metal/cpu.h \
metal/csr.h \
metal/gpio.h \
metal/hpm.h \
metal/i2c.h \
metal/init.h \
metal/interrupt.h \
Expand Down Expand Up @@ -103,6 +106,7 @@ libmetal_a_SOURCES = \
src/drivers/riscv_clint0.c \
src/drivers/riscv_cpu.c \
src/drivers/riscv_plic0.c \
src/drivers/sifive_buserror0.c \
src/drivers/sifive_ccache0.c \
src/drivers/sifive_clic0.c \
src/drivers/sifive_fe310-g000_hfrosc.c \
Expand All @@ -124,6 +128,7 @@ libmetal_a_SOURCES = \
src/drivers/sifive_test0.c \
src/drivers/sifive_trace.c \
src/drivers/sifive_uart0.c \
src/drivers/sifive_simuart0.c \
src/drivers/sifive_wdog0.c \
src/drivers/ucb_htif0.c \
src/atomic.c \
Expand All @@ -132,8 +137,10 @@ libmetal_a_SOURCES = \
src/clock.c \
src/cpu.c \
src/entry.S \
src/scrub.S \
src/trap.S \
src/gpio.c \
src/hpm.c \
src/i2c.c \
src/init.c \
src/interrupt.c \
Expand All @@ -156,6 +163,28 @@ libmetal_a_SOURCES = \
src/vector.S \
src/watchdog.c

########################################################
# libmetal-pico
########################################################

# Build support for picolibc if --with-builtin-libmetal-pico is passed to configure
if WITH_BUILTIN_LIBMETAL_PICO

lib_LIBRARIES += libmetal-pico.a

libmetal_pico_a_SOURCES = \
pico/iob.c \
gloss/crt0.S \
gloss/sys_sbrk.c \
gloss/sys_exit.c \
gloss/sys_times.c \
gloss/sys_sysconf.c \
gloss/sys_gettimeofday.c \
gloss/sys_clock_gettime.c \
gloss/sys_write.c

endif # WITH_BUILTIN_LIBMETAL_PICO

########################################################
# libgloss
########################################################
Expand All @@ -173,6 +202,7 @@ libmetal_gloss_a_SOURCES = \
gloss/sys_chdir.c \
gloss/sys_chmod.c \
gloss/sys_chown.c \
gloss/sys_clock_gettime.c \
gloss/sys_close.c \
gloss/sys_execve.c \
gloss/sys_exit.c \
Expand Down
Loading

0 comments on commit e0f23f2

Please sign in to comment.