Skip to content

Build release packages #47

Build release packages

Build release packages #47

name: Build release packages
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
pkg-ubuntu:
name: Package for Ubuntu
strategy:
matrix:
include:
- { os: ubuntu-22.04 }
- { os: ubuntu-24.04 }
runs-on: ${{matrix.os}}
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)
echo "VERSION=$vers" >> $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 -y build-dep .
dpkg-buildpackage -uc -us -b
mv ../nvc_${{ env.VERSION }}-1_amd64.deb nvc_${{ env.VERSION }}-1_amd64_${{ matrix.os }}.deb
- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: '${{matrix.os}} package'
path: nvc_${{ env.VERSION }}-1_amd64_${{ matrix.os }}.deb
msi-installer:
name: Windows installer
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build MSI installer
uses: ./.github/actions/windows-installer
docker:
name: Docker image
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build Docker image
run: ./contrib/docker/build.sh
- uses: actions/checkout@v4
with:
repository: nickg/vhdl-projects
path: vhdl-projects
fetch-depth: 1
- name: Test
run: |
docker run --rm -v $(pwd)/vhdl-projects:/data \
ghcr.io/nickg/nvc:latest /data/flopoco/test.sh
- name: Push to ghcr.io
run : |
echo "${{ secrets.GHCR_TOKEN }}" | \
docker login -u ${{ vars.GHCR_USER }} --password-stdin ghcr.io
docker push ghcr.io/nickg/nvc:latest