Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Commit

Permalink
Enable CI
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 committed Aug 20, 2020
1 parent 07f37ce commit 80b4b3a
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: windows-latest

steps:
- name: Clone Repo
uses: actions/checkout@v2

- name: Run Build Script
run: |
cmd.exe /c "$env:GITHUB_WORKSPACE\tools\build.cmd"
Compress-Archive "$env:GITHUB_WORKSPACE\build\bcm2836\Output\*" -DestinationPath "$env:GITHUB_WORKSPACE\rpi-arm64-bsp.zip"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true

- 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: ./rpi-arm64-bsp.zip
asset_name: rpi-arm64-bsp.zip
asset_content_type: application/zip
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest

steps:
- name: Clone Repo
uses: actions/checkout@v2

- name: Run Build Script
run: |
cmd.exe /c "$env:GITHUB_WORKSPACE\tools\build.cmd"
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: output
path: build/bcm2836/Output
59 changes: 59 additions & 0 deletions tools/build.cmd
@@ -0,0 +1,59 @@
@echo off
setlocal enableDelayedExpansion
pushd "%~dp0..\build\bcm2836"

REM Find Visual Studio Installations
for /f "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -requires Microsoft.Component.MSBuild -find VC\Auxiliary\Build\vcvarsall.bat') do (
set vcvarsall="%%i"
)
call !vcvarsall! x86

REM Build drivers
msbuild /p:Configuration=Release /p:Platform=ARM64 /m

REM Copy to output directory
rmdir Output /s /q 2>nul
mkdir Output 2>nul
pushd ARM64\Release
for /f "tokens=*" %%i in ('dir /b *.dll *.sys *.inf *.pdb') do (
copy %%i ..\..\Output /y > nul
)
popd

pushd Output

REM Sign drivers
inf2cat /os:10_VB_ARM64 /drv:. /uselocaltime
signtool sign /fd SHA256 /f "%~dp0testcert.pfx" /p testcert123 /v *.dll *.sys *.cat *.dll

REM Package
for /f "delims=. tokens=1" %%i in ('dir /b *.inf') do (
mkdir %%i 2>nul
move %%i.* %%i >nul
)
move vchiq_arm_kern.* vchiq >nul
move vcos_win32_kern.* vchiq >nul

REM Generate compatibility list
for %%m in (RPi3 RPi4) do (
for /f "tokens=*" %%i in ('dir /b /a:d') do (
set supported=1

if /I [%%m] == [RPi3] (
if /I [%%i] == [vchiq] set supported=0
if /I [%%i] == [rpiuxflt] set supported=0
if /I [%%i] == [bcmgenet] set supported=0
)

if /I [%%m] == [RPi4] (
if /I [%%i] == [vchiq] set supported=0
if /I [%%i] == [RpiLanPropertyChange] set supported=0
)

if !supported! == 1 (echo %%i>> %%m.txt)
)
)

popd
popd

Binary file added tools/testcert.pfx
Binary file not shown.

0 comments on commit 80b4b3a

Please sign in to comment.