riscv-openocd/.github/workflows/linux-build.yml

62 lines
1.8 KiB
YAML
Raw Permalink Normal View History

on: pull_request
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
name: Linux Build
jobs:
# 32-bit, clang
build32:
runs-on: ubuntu-20.04
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
env:
CFLAGS: -m32
CC: clang
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install required packages (apt-get)
run: |
sudo apt-get update
sudo apt-get install clang gcc-multilib
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
- run: ./bootstrap
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --disable-target64
- run: make -j`nproc`
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
- run: file src/openocd | grep 32-bit
- run: src/openocd --version
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
# 64-bit, gcc
build64:
runs-on: ubuntu-latest
env:
CFLAGS: -m64
CC: gcc
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Configure environment
run: |
TAG=$(git rev-parse --short HEAD)
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "NAME=openocd64-$TAG" >> $GITHUB_ENV
- name: Install required packages (apt-get)
run: |
sudo apt-get update
sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
Use github actions for automated builds (#627) * Copy snapshot workflow from mainline. Travis died. We need something that checks OpenOCD builds. Change-Id: I7c018caaa3a13884fc526733271697bc90edc891 Signed-off-by: Tim Newsome <tim@sifive.com> * Run checkpatch like we used to do with travis. Nervous about this because upstream often messes things up. Change-Id: I0ca0229ea2bd4422d7ffe4800e8861acc716cf56 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more, install filterdiff. Change-Id: I8cca61c5adc91b845619f2cc89accbb5217ce73a Signed-off-by: Tim Newsome <tim@sifive.com> * It's patchutils, not filterdiff. Change-Id: I2afe78bc4153462283a61571e15ee147f9f20b10 Signed-off-by: Tim Newsome <tim@sifive.com> * Fetch more revisions. Change-Id: Ieb5269494721f7b78d93d67c502203f1b1fbbba7 Signed-off-by: Tim Newsome <tim@sifive.com> * gnulib no longer exists. Change-Id: I97fc797c99f19f6b504952f7cb9c7072181c1e72 Signed-off-by: Tim Newsome <tim@sifive.com> * Working on Linux build. Change-Id: I6b70fbf5bd2dbb5f1540d0d929310b29b312566e Signed-off-by: Tim Newsome <tim@sifive.com> * Don't actually publish any artifacts. Change-Id: Ic363744e0530288f3f78268d1becfbfb6b47b505 Signed-off-by: Tim Newsome <tim@sifive.com> * Add 32-bit build? Change-Id: I44866e0da539db7b8e3bd0536d305bee0595a301 Signed-off-by: Tim Newsome <tim@sifive.com> * Fix environment. Change-Id: I19c3ef2cc886350db243a07185d2441ca9328dfa Signed-off-by: Tim Newsome <tim@sifive.com> * Fix syntax error. Change-Id: I80ba08d9929d4c2f0e57b393b6b53462202f5bce Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax error. Change-Id: I24c5270683626b7007f9c100f1a36c9fa28a3405 Signed-off-by: Tim Newsome <tim@sifive.com> * Shooting in the dark trying to fix problem. Change-Id: Iecb3dc67ec6a0b932167b65dd0a5b82da9a1518f Signed-off-by: Tim Newsome <tim@sifive.com> * More syntax fixing. Change-Id: I01f014f38e742b9a6c0d7c2e5b31058536572506 Signed-off-by: Tim Newsome <tim@sifive.com> * Install clang. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I1d6828554ade149f7319f0797238a4e23f073a25 * Store config.log Change-Id: I8275341de2c042ef32c6d57687c420b6dc53c8ab Signed-off-by: Tim Newsome <tim@sifive.com> * Install gcc-multilib Change-Id: I08f233f58f3a4cbc89ae5dd0314d99319bf5724c Signed-off-by: Tim Newsome <tim@sifive.com> * Check final executable. Intentionally supposed to fail. Change-Id: I003dba85e766e3cf3ef4d6925d96f5b09a9fe80f Signed-off-by: Tim Newsome <tim@sifive.com> * All done! Change-Id: I37ed2142082fdbce01157e0989c4e2122229abb7 Signed-off-by: Tim Newsome <tim@sifive.com>
2021-07-12 13:21:46 -05:00
- run: ./bootstrap
- run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --prefix /tmp/${{ env.NAME }}
- run: make -j`nproc`
- name: Check that we built something
run: |
file src/openocd | grep 64-bit
src/openocd --version
- name: Package
# Package into tgz so that github stores a compressed artifact, even
# though it zips that artifact again before it sends it back to be
# downloaded.
run: |
make install
tar zcvf ${{ env.NAME }}.tgz -C /tmp ${{ env.NAME }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.NAME }}
path: ${{ env.NAME }}.tgz