b48388ef7c90241d91ab1b4f655d08d9168086e0
[openocd.git] / .github / workflows / snapshot.yml
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 # Copyright (C) 2020 by Tarek BOUCHKATI <tarek.bouchkati@gmail.com>
4
5 on: push
6
7 name: OpenOCD Snapshot
8
9 jobs:
10 package:
11 runs-on: [ubuntu-20.04]
12 env:
13 DL_DIR: ../downloads
14 BUILD_DIR: ../build
15 steps:
16 - name: Install needed packages
17 run: |
18 sudo apt-get update
19 sudo apt-get install autotools-dev autoconf automake libtool pkg-config cmake texinfo texlive g++-mingw-w64-i686
20 - name: Checkout Code
21 uses: actions/checkout@v1
22 - run: ./bootstrap
23 - name: Prepare libusb1
24 env:
25 LIBUSB1_VER: 1.0.26
26 run: |
27 mkdir -p $DL_DIR && cd $DL_DIR
28 wget "https://github.com/libusb/libusb/releases/download/v${LIBUSB1_VER}/libusb-${LIBUSB1_VER}.tar.bz2"
29 tar -xjf libusb-${LIBUSB1_VER}.tar.bz2
30 echo "LIBUSB1_SRC=$PWD/libusb-${LIBUSB1_VER}" >> $GITHUB_ENV
31 - name: Prepare hidapi
32 env:
33 HIDAPI_VER: 0.13.1
34 run: |
35 mkdir -p $DL_DIR && cd $DL_DIR
36 wget "https://github.com/libusb/hidapi/archive/hidapi-${HIDAPI_VER}.tar.gz"
37 tar -xzf hidapi-${HIDAPI_VER}.tar.gz
38 cd hidapi-hidapi-${HIDAPI_VER}
39 ./bootstrap
40 echo "HIDAPI_SRC=$PWD" >> $GITHUB_ENV
41 - name: Prepare libftdi
42 env:
43 LIBFTDI_VER: 1.5
44 run: |
45 mkdir -p $DL_DIR && cd $DL_DIR
46 wget "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VER}.tar.bz2"
47 tar -xjf libftdi1-${LIBFTDI_VER}.tar.bz2
48 echo "LIBFTDI_SRC=$PWD/libftdi1-${LIBFTDI_VER}" >> $GITHUB_ENV
49 - name: Prepare capstone
50 env:
51 CAPSTONE_VER: 4.0.2
52 run: |
53 mkdir -p $DL_DIR && cd $DL_DIR
54 CAPSTONE_NAME=${CAPSTONE_VER}
55 CAPSTONE_FOLDER=capstone-${CAPSTONE_VER}
56 wget "https://github.com/aquynh/capstone/archive/${CAPSTONE_VER}.tar.gz"
57 tar -xzf ${CAPSTONE_VER}.tar.gz
58 echo "CAPSTONE_SRC=$PWD/capstone-${CAPSTONE_VER}" >> $GITHUB_ENV
59 - name: Package OpenOCD for windows
60 env:
61 MAKE_JOBS: 2
62 HOST: i686-w64-mingw32
63 LIBUSB1_CONFIG: --enable-shared --disable-static
64 HIDAPI_CONFIG: --enable-shared --disable-static --disable-testgui
65 LIBFTDI_CONFIG: -DSTATICLIBS=OFF -DEXAMPLES=OFF -DFTDI_EEPROM=OFF
66 CAPSTONE_CONFIG: "CAPSTONE_BUILD_CORE_ONLY=yes CAPSTONE_STATIC=yes CAPSTONE_SHARED=no"
67 run: |
68 # check if there is tag pointing at HEAD, otherwise take the HEAD SHA-1 as OPENOCD_TAG
69 OPENOCD_TAG="`git tag --points-at HEAD`"
70 [ -z $OPENOCD_TAG ] && OPENOCD_TAG="`git rev-parse --short HEAD`"
71 # check if there is tag pointing at HEAD, if so the release will have the same name as the tag,
72 # otherwise it will be named 'latest'
73 RELEASE_NAME="`git tag --points-at HEAD`"
74 [ -z $RELEASE_NAME ] && RELEASE_NAME="latest"
75 [[ $RELEASE_NAME = "latest" ]] && IS_PRE_RELEASE="true" || IS_PRE_RELEASE="false"
76 # set env and call cross-build.sh
77 export OPENOCD_TAG=$OPENOCD_TAG
78 export OPENOCD_SRC=$PWD
79 export OPENOCD_CONFIG=""
80 mkdir -p $BUILD_DIR && cd $BUILD_DIR
81 bash $OPENOCD_SRC/contrib/cross-build.sh $HOST
82 # add missing dlls
83 cd $HOST-root/usr
84 cp `$HOST-gcc --print-file-name=libwinpthread-1.dll` ./bin/
85 # required by libftdi1.dll. For the gcc-mingw-10.3.x or later "libgcc_s_dw2-1.dll" will need to be copied.
86 cp `$HOST-gcc --print-file-name=libgcc_s_sjlj-1.dll` ./bin/
87 # prepare the artifact
88 ARTIFACT="openocd-${OPENOCD_TAG}-${HOST}.tar.gz"
89 tar -czf $ARTIFACT *
90 echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
91 echo "IS_PRE_RELEASE=$IS_PRE_RELEASE" >> $GITHUB_ENV
92 echo "ARTIFACT_PATH=$PWD/$ARTIFACT" >> $GITHUB_ENV
93 - name: Publish OpenOCD packaged for windows
94 uses: actions/upload-artifact@v3
95 with:
96 path: ${{ env.ARTIFACT_PATH }}
97 - name: Delete 'latest' Release
98 uses: dev-drprasad/delete-tag-and-release@v0.2.1
99 with:
100 delete_release: true
101 tag_name: ${{ env.RELEASE_NAME }}
102 env:
103 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104 - name: Create Release
105 uses: ncipollo/release-action@v1
106 with:
107 tag: ${{ env.RELEASE_NAME }}
108 commit: ${{ github.sha }}
109 draft: false
110 artifacts: ${{ env.ARTIFACT_PATH }}
111 prerelease: ${{ env.IS_PRE_RELEASE }}
112 token: ${{ secrets.GITHUB_TOKEN }}

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)