mirror of
https://github.com/im-tomu/fomu-toolchain.git
synced 2024-09-19 18:30:16 +00:00
ci: migrate from Travis CI to GitHub Actions
This commit is contained in:
parent
1c441a2344
commit
a85a64a66b
49
.github/workflows/update.yml
vendored
Normal file
49
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: 'update'
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
run:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
os: [ Linux, Windows, macOS ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- run: git config --global core.autocrlf input
|
||||
shell: bash
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: ARCH=${{ matrix.os }} ./build.sh
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: fomu-toolchain-${{ matrix.os }}
|
||||
path: |
|
||||
output/fomu-toolchain-${{ matrix.os }}*.tar.gz
|
||||
output/fomu-toolchain-${{ matrix.os }}*.zip
|
||||
output/fomu-toolchain-${{ matrix.os }}*.sha1
|
||||
output/fomu-toolchain-${{ matrix.os }}*.sha256
|
||||
output/fomu-toolchain-${{ matrix.os }}*.sha512
|
||||
|
||||
release:
|
||||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/'))
|
||||
needs: [ run ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
|
||||
- uses: eine/tip@master
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
tag: nightly
|
||||
files: ./**
|
33
.travis.yml
33
.travis.yml
@ -1,33 +0,0 @@
|
||||
language: minimal
|
||||
matrix:
|
||||
include:
|
||||
- env: ARCH=windows
|
||||
- env: ARCH=macos
|
||||
- env: ARCH=linux_x86_64
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- unzip
|
||||
- zip
|
||||
install: skip
|
||||
script: ./build.sh
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: "KFeNj4DOaqcSDLAMhfLfsz0X7DLKL82T8+FQ8VFt9PeUpcacAQ2B8YU/IFxcSNM9vR8IA4wvqNEuVaG9+/FIlV9Phwo9CpWiQ2urz1yENn7e7Wo1yL3A3/Fxf8hMq9vF8pUy1rcnsmi9LOdq+7W5y7pVCbdf6TL6SBkFXRPosJX0AE8CijQkA4q6ZcZ4yxwfx87sPGTCTSqZHbHTzPNJKWqJNHvt1js/rDDClnQEtsn/oLZv5xpOPoh3quAqaAhL2ZzJjJcjgwnXD76uKYXACfhiACAZILz/2Tf8/2pL7u52HPP34RpFNEv/imOh2R2ilY9zMv7MTf+FwjUmcuKGHFgaZhwXmYYgYJRiZMCuu6336H7eIH3N46/khElIPWnXWIwZHRy/24DnKKQNyfUzVLmfV0RAeSEupmmZCCOLTORRQ0CDWBjWU5q5/gvqt0+z8XA7uxdIUmUgpr49zgkTivC7JGxBeFwqbuspg/3aLrrGuRxtluWuQPt8O6cJIFYsLIs1DUzT8Rhyy/T4kInICzp28akzOk0SFc5jZdT2OhKBJJD3+ZaeFVtTiHMTxq67oxbvKXRKMwU7Zy2m5Hvmvo/laR35cNTlaEnacHsMdhxV554Hbh8FUoYFgjL50HsFo1THPlNW1opczLoGSBaV0eW1AepSvM9Jv2AfCF68Yr8="
|
||||
file:
|
||||
- output/*.tar.gz
|
||||
- output/*.zip
|
||||
- output/*.sha1
|
||||
- output/*.sha256
|
||||
- output/*.sha512
|
||||
file_glob: true
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: im-tomu/fomu-toolchain
|
||||
all_branches: true
|
||||
tags: true
|
||||
branches:
|
||||
only:
|
||||
# Release tags
|
||||
- /^v\d+\.\d+/
|
22
build.sh
22
build.sh
@ -20,7 +20,7 @@ linux_wishbone_tool_url="https://github.com/litex-hub/wishbone-utils/releases/do
|
||||
linux_riscv_url="https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz"
|
||||
|
||||
base="$(pwd)"
|
||||
output_name="fomu-toolchain-${ARCH}-${TRAVIS_TAG}"
|
||||
output_name="fomu-toolchain-${ARCH}"
|
||||
output="${base}/output/${output_name}"
|
||||
input="${base}/input"
|
||||
|
||||
@ -28,14 +28,6 @@ mkdir -p $output
|
||||
mkdir -p $input
|
||||
mkdir -p $output/bin
|
||||
|
||||
if [ -z ${TRAVIS_TAG} ]
|
||||
then
|
||||
echo "This repository is designed to be run in the Travis CI system."
|
||||
echo "Please download the prebuilt distribution for your platform at:"
|
||||
echo "https://github.com/im-tomu/fomu-toolchain/releases/latest"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checksum_output() {
|
||||
set +x
|
||||
hashes="sha1 sha256 sha512"
|
||||
@ -58,7 +50,7 @@ extract_zip() {
|
||||
}
|
||||
|
||||
case "${ARCH}" in
|
||||
"windows")
|
||||
"Windows")
|
||||
# Python 3.7.3 (which matches the version in nextpnr)
|
||||
extract_zip $win_python_url $input/python-${ARCH}.zip "/bin"
|
||||
rm python37.zip # we already have this unzipped from nextpnr-ice40
|
||||
@ -98,7 +90,7 @@ case "${ARCH}" in
|
||||
checksum_output .zip
|
||||
;;
|
||||
|
||||
"macos")
|
||||
"macOS")
|
||||
# Nextpnr
|
||||
curl -fsSL $mac_nextpnr_url | tar xvzf - -C $output
|
||||
|
||||
@ -125,7 +117,7 @@ case "${ARCH}" in
|
||||
checksum_output .zip
|
||||
;;
|
||||
|
||||
"linux_x86_64")
|
||||
"Linux")
|
||||
# Nextpnr
|
||||
curl -fsSL $linux_nextpnr_url | tar xvzf - -C $output
|
||||
|
||||
@ -152,12 +144,12 @@ case "${ARCH}" in
|
||||
checksum_output .tar.gz
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized architecture: ${ARCH}"
|
||||
echo "Supported architectures: macos, windows, linux_x86_64"
|
||||
echo "Unrecognized platform: ${ARCH}"
|
||||
echo "Supported platforms: MacOS, Windows, Linux"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "${TRAVIS_TAG}" > $output/VERSION
|
||||
echo "${GITHUB_SHA}" > $output/VERSION
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user