Skip to content

Build MSYS2 and Ubuntu packages #18

Build MSYS2 and Ubuntu packages

Build MSYS2 and Ubuntu packages #18

name: Build MSYS2 and Ubuntu packages
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
pkg-windows-msys2:
name: Package for Windows MSYS2
runs-on: windows-2019
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
base-devel
git
mingw-w64-${{matrix.env}}-tcl
- name: Debugging for tags
run: |
git tag
git describe --long
- name: Build MSYS2 ${{matrix.sys}} package
run: |
cd contrib/msys2
makepkg-mingw -sCLf --needed --noconfirm
pacman -Qlp *.zst
echo "MSYS2_PKG=$(ls *.zst)" >> $GITHUB_ENV
- name: Install package
run: pacman -U --noconfirm contrib/msys2/*.zst
- name: Install OSVVM
run: nvc --install osvvm
- name: Install UVVM
run: nvc --install uvvm
- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: 'MSYS2 ${{matrix.sys}} package'
path: contrib/msys2/${{ env.MSYS2_PKG }}
pkg-ubuntu:
name: Package for Ubuntu
strategy:
matrix:
include:
- { os: ubuntu-20.04 }
- { os: ubuntu-22.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)
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 ../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-2019
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build MSI installer
uses: ./.github/actions/windows-installer