aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-04-12 08:41:47 -0700
committerGitHub <noreply@github.com>2023-04-12 08:41:47 -0700
commit92dd9eed711277d17afffa2988b5ba27e1d6a832 (patch)
treeff3c0a3bf9dc62cc85b921d7aa3a6fe13df70231 /.github
parentc454db3eeef446217139d7e1447c7cc465c14301 (diff)
downloadriscv-openocd-92dd9eed711277d17afffa2988b5ba27e1d6a832.zip
riscv-openocd-92dd9eed711277d17afffa2988b5ba27e1d6a832.tar.gz
riscv-openocd-92dd9eed711277d17afffa2988b5ba27e1d6a832.tar.bz2
Preserve artifact of Linux build, too. (#828)
* Preserve artifact of Linux build, too. That can be handy to e-mail to people who don't have a build setup. Change-Id: I7b7e2d6f0033edf71f53211168f74b80ada64b97 Signed-off-by: Tim Newsome <tim@sifive.com> * workflow: Run Linux build on Ubuntu 20.04, which is LTS. This makes the binaries more useful. Change-Id: I0cf6df68f03c4161222baa222c466fe0004ea769 Signed-off-by: Tim Newsome <tim@sifive.com> * Use checkoutv3 Co-authored-by: Jan Matyas <50193733+JanMatCodasip@users.noreply.github.com> Signed-off-by: Tim Newsome <tim@sifive.com> --------- Signed-off-by: Tim Newsome <tim@sifive.com> Co-authored-by: Jan Matyas <50193733+JanMatCodasip@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/linux-build.yml30
1 files changed, 24 insertions, 6 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index f566d8c..01e230c 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -5,7 +5,7 @@ name: Linux Build
jobs:
# 32-bit, clang
build32:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
env:
CFLAGS: -m32
CC: clang
@@ -22,7 +22,6 @@ jobs:
- run: file src/openocd | grep 32-bit
- run: src/openocd --version
-
# 64-bit, gcc
build64:
runs-on: ubuntu-latest
@@ -31,13 +30,32 @@ jobs:
CC: gcc
steps:
- name: Checkout Code
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
+ - 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
- run: ./bootstrap
- - run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag
+ - run: ./configure --enable-remote-bitbang --enable-jtag_vpi --enable-ftdi-cjtag --prefix /tmp/${{ env.NAME }}
- run: make -j`nproc`
- - run: file src/openocd | grep 64-bit
- - run: src/openocd --version
+ - 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@v3
+ with:
+ name: ${{ env.NAME }}
+ path: ${{ env.NAME }}.tgz