-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (67 loc) · 2.19 KB
/
Copy pathbuild.yml
File metadata and controls
68 lines (67 loc) · 2.19 KB
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
name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
sys:
- { os: windows-latest, shell: 'msys2 {0}', artifact: 'elaphurelink-openocd-win32-x64' }
- { os: ubuntu-22.04, shell: bash, artifact: 'elaphurelink-openocd-linux-x64' }
runs-on: ${{ matrix.sys.os }}
defaults:
run:
shell: ${{ matrix.sys.shell }}
steps:
- name: Prepare
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libtool pkg-config libcapstone-dev libhidapi-dev libftdi1-dev libusb-1.0-0-dev libuv1-dev libjaylink-dev
- name: Setup msys2
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
autotools
base-devel
git
mingw-w64-ucrt-x86_64-capstone
mingw-w64-ucrt-x86_64-hidapi
mingw-w64-ucrt-x86_64-libftdi
mingw-w64-ucrt-x86_64-libjaylink
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-libuv
mingw-w64-ucrt-x86_64-toolchain
- name: Git config setting
if: runner.os == 'Windows'
shell: cmd
run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Build
run: |
mkdir install
git clone https://github.com/openocd-org/openocd.git && cd openocd
git checkout 2741efc60ae03e2a5fea707685df59a3c4256437
git submodule update --init --recursive
git apply ../patch/*.patch
cp ../cmsis_dap_elaphurelink.c src/jtag/drivers
cp ../elaphurelink.cfg tcl/interface
./bootstrap
./configure --prefix=$PWD/../install --enable-internal-jimtcl
make -j12
make install
- name: Copy DLL
if: runner.os == 'Windows'
run: |
cd $GITHUB_WORKSPACE/install/bin
cp /ucrt64/bin/libcapstone.dll ./
cp /ucrt64/bin/libftdi1.dll ./
cp /ucrt64/bin/libhidapi-0.dll ./
cp /ucrt64/bin/libjaylink-0.dll ./
cp /ucrt64/bin/libusb-1.0.dll ./
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.sys.artifact }}
path: install