This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (87 loc) · 3.06 KB
/
build-current.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: build current
# Controls when the workflow will run
on:
# Build on saturday
schedule:
- cron: "47 3 * * 6"
# Triggers the workflow on push or pull request
# push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-bmda:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
repository: "blackmagic-debug/blackmagic"
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git zip mingw-w64-ucrt-x86_64-toolchain patch
pacboy: libusb:p libftdi:p hidapi:p
- uses: actions/checkout@v4
with:
path: "bmp"
- name: Patch
run: patch -p1 -i bmp/at32f405.patch
- name: build
run: |
rm -fv /ucrt64/lib/libftdi1.dll.a /ucrt64/lib/libhidapi.dll.a /ucrt64/lib/libusb-1.0.dll.a
mingw32-make PROBE_HOST=hosted HOSTED_BMP_ONLY=0
zip -j9 bmda.zip src/blackmagic.exe 3rdparty/ftdi/amd64/ftd2xx.dll
- uses: actions/upload-artifact@v4
with:
name: bmda
path: bmda.zip
retention-days: 1
build-firmware:
runs-on: ubuntu-latest
needs: build-bmda
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
repository: "blackmagic-debug/blackmagic"
- name: Get commit hash
id: getcommit
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Report commit hash
run: echo ${{ steps.getcommit.outputs.sha_short }}
- uses: actions/checkout@v4
with:
path: "bmp"
- name: Patch
run: patch -p1 -i bmp/blackmagic.patch; patch -p1 -i bmp/bluepill.patch; patch -p1 -i bmp/at32f405.patch
# Setup and use a suitable ARM GCC for the firmware
- name: Setup ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.2.Rel1'
- name: Install BMDA dependencies
run: sudo apt-get -y install libusb-dev libftdi1-dev libhidapi-dev
- name: Build all platform firmwares and Linux BMDA
run: |
make all_platforms
mv src/artifacts/hosted/ src/artifacts/linux/
mv src/artifacts/linux/blackmagic-hosted src/artifacts/linux/blackmagic
- uses: actions/download-artifact@v4
with:
name: bmda
- name: Unzip windows bmda
run: unzip bmda.zip -d src/artifacts/windows
- name: Zip
run: ( ln -s src/artifacts blackmagic-firmware-${{ steps.getcommit.outputs.sha_short }}; zip -r9 blackmagic-firmware.zip blackmagic-firmware-${{ steps.getcommit.outputs.sha_short }}/ )
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "blackmagic-firmware.zip"
body: "bmp firmware, current git"
tag: current
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
# not truncated