1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
name: Build Windows Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [MINGW32, MINGW64, UCRT64]
include:
- sys: MINGW32
arch: i686
name: mingw32
usb_libs:
cfg_parms:
- sys: MINGW64
arch: x86-64
name: mingw64
usb_libs: libusb:p libftdi:p
cfg_parms: --with-usbsid --with-exsid
- sys: UCRT64
arch: x86-64
name: ucrt64
usb_libs: libusb:p libftdi:p
cfg_parms: --with-usbsid --with-exsid
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
zip
upx
base-devel
pacboy: >-
toolchain:p
autotools:p
${{matrix.usb_libs}}
- uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'libsidplayfp/libsidplayfp'
regex: true
file: "libsidplayfp-.*\\.tar\\.gz"
target: 'subdir/'
- name: build-lib
run: |
cd subdir
export LDFLAGS="-s -Wl,-no-undefined -Wl,-O1 -static"
export CXXFLAGS="-O2 -march=${{matrix.arch}} -fomit-frame-pointer -pipe -DUNICODE"
export PKG_CONFIG="pkg-config --static"
tar -xf libsidplayfp*.tar.gz
cd libsidplayfp*/.
./configure --disable-dependency-tracking --disable-shared --enable-static --without-gcrypt --enable-hardsid ${{matrix.cfg_parms}} --with-simd=runtime
make && make install
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Get the tag name
id: get_tag_name
run: echo "tagname=${GITHUB_REF#refs/tags/}" | sed 's/v//' >> $GITHUB_OUTPUT
- name: build
run: |
export LDFLAGS="-s -Wl,-no-undefined -Wl,-O1 -static"
export CXXFLAGS="-O2 -march=${{matrix.arch}} -fomit-frame-pointer -pipe -DUNICODE"
export PKG_CONFIG="pkg-config --static"
autoreconf -vfi
./configure --disable-dependency-tracking
make
mv src/*.exe .
strip *.exe
upx *.exe
pod2text doc/en/sidplayfp.ini.pod > sidplayfp.ini.txt
pod2text doc/en/sidplayfp.pod > sidplayfp.txt
pod2text doc/en/stilview.pod > stilview.txt
zip sidplayfp-${{ steps.get_tag_name.outputs.tagname }}-${{matrix.name}}.zip *.exe README* AUTHORS *.txt
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: sidplayfp-${{ steps.get_tag_name.outputs.tagname }}-${{matrix.name}}.zip
tag: ${{ github.ref }}
file_glob: true
overwrite: true
|