-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from antmicro/add-gh-actions
Add GH actions
- Loading branch information
Showing
3 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
WORKDIR=${PWD} | ||
|
||
# Getting the ARM toolchain | ||
wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj | ||
export PATH=${PWD}/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH | ||
|
||
# Create artifacts directory | ||
mkdir root boot | ||
|
||
# Build U-boot bootloader | ||
pushd u-boot-xlnx | ||
export ARCH=arm | ||
export CROSS_COMPILE=arm-none-eabi- | ||
make zynq_zybo_z7_defconfig | ||
make -j`nproc` | ||
|
||
cp spl/boot.bin u-boot.img ${WORKDIR}/boot | ||
popd | ||
|
||
# Build Linux kernel | ||
pushd linux-xlnx | ||
git apply ../linux/0001-Add-symbiflow-tester-driver.patch | ||
export ARCH=arm | ||
export CROSS_COMPILE=arm-none-eabi- | ||
export LOADADDR=0x8000 | ||
make xilinx_zynq_defconfig | ||
make -j`nproc` uImage | ||
make -j`nproc` dtbs | ||
make -j`nproc` modules | ||
|
||
cp arch/arm/boot/uImage ${WORKDIR}/boot | ||
cp arch/arm/boot/dts/zynq-zybo-z7.dtb ${WORKDIR}/boot/devicetree.dtb | ||
cp drivers/misc/symbiflow-tester.ko ${WORKDIR}/root | ||
popd | ||
|
||
# Adding required files to rootfs | ||
cp -a python/symbiflow_test.py devmemX zynq_bootloader ${WORKDIR}/root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: CI artifacts generation | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
|
||
jobs: | ||
|
||
Run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y bzip2 make u-boot-tools | ||
- name: Build Images | ||
run: | | ||
source .github/scripts/ci.sh | ||
zip -r uboot-linux-images.zip root boot | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release xc7 automatic tester | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./uboot-linux-images.zip | ||
asset_name: uboot-linux-images.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters