Skip to content

Commit

Permalink
Split Ubuntu package build into separate workflow step
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Aug 11, 2023
1 parent b523e9c commit 10fa7f1
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./build/coverage/nvc.info
- name: Build Debian package
run: |
ln -s contrib/debian debian
sed -i 's/nvc (.*)/nvc (${{ env.VERSION }}-1)/' debian/changelog
sudo apt-get build-dep .
dpkg-buildpackage -uc -us -b
mv ../*.deb .
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: 'Ubuntu package'
path: nvc_${{ env.VERSION }}-1_amd64.deb

build-mac:
name: Mac OS
Expand Down Expand Up @@ -176,9 +164,35 @@ jobs:
name: 'MSYS2 mingw64 package'
path: contrib/msys2/${{ env.MSYS2_PKG }}

build-package:
name: Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Get version
id: version
run: |
vers=$(sed -n '1s/AC_INIT(\[.*\], \[\([0-9\.]*\).*\].*/\1/p' configure.ac)
full=$(git log --date=format:%Y%m%d --pretty=$vers~git%cd.%h -1)
echo "VERSION=$full" >> $GITHUB_ENV
- name: Build Debian package
run: |
ln -s contrib/debian debian
sed -i 's/nvc (.*)/nvc (${{ env.VERSION }}-1)/' debian/changelog
sudo apt-get build-dep .
dpkg-buildpackage -uc -us -b
mv ../*.deb .
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: 'Ubuntu package'
path: nvc_${{ env.VERSION }}-1_amd64.deb

vests:
name: VESTs
needs: [ build-ubuntu ]
needs: [ build-package ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -208,7 +222,7 @@ jobs:
projects:
name: External Projects
needs: [ build-ubuntu ]
needs: [ build-package ]
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
Expand Down Expand Up @@ -268,7 +282,7 @@ jobs:

vunit:
name: VUnit
needs: [ build-ubuntu ]
needs: [ build-package ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -340,7 +354,7 @@ jobs:
osvvm:
if: ${{ false }} # Takes too long for now
name: OSVVM
needs: [ build-ubuntu ]
needs: [ build-package ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 10fa7f1

Please sign in to comment.