Skip to content

fix glib-genmarshal...now? #58

fix glib-genmarshal...now?

fix glib-genmarshal...now? #58

Workflow file for this run

name: Make Release
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+' # any tag that looks like a release version, ex. 3.6.0
concurrency:
group: Release Build
cancel-in-progress: true
jobs:
create_release:
name: Create Draft Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_id: ${{ steps.create_release.outputs.release_id }}
steps:
- name: Create Release
id: create_release
uses: actions/github-script@v6
env:
TAG_NAME: ${{ github.ref }}
RELEASE_NAME: ${{ github.ref }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
const { TAG_NAME, RELEASE_NAME } = process.env;
const createReleaseResponse = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: TAG_NAME.replace('refs/tags/', ''),
name: RELEASE_NAME.replace('refs/tags/', ''),
draft: true,
prerelease: false,
target_commitish: context.sha
});
core.setOutput('release_id', createReleaseResponse.data.id);
core.setOutput('upload_url', createReleaseResponse.data.upload_url);
build_tarball:
name: Build Tarball
needs: create_release
runs-on: ubuntu-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v3
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt-get -y install autoconf automake build-essential byacc flex xa65 dos2unix libpcap-dev libcurl4-openssl-dev libgio-2.0-dev
- name: Build
id: build
shell: bash
run: |
cd vice
./src/buildtools/genvicedate_h.sh
./autogen.sh
./configure --with-resid --disable-pdf-docs --enable-headlessui --without-pulse --without-alsa --without-png
make dist
TARBALL=$(ls vice-*.tar.gz)
echo "tarball_path=$(pwd)/${TARBALL}" >> $GITHUB_OUTPUT
echo "tarball_name=${TARBALL}" >> $GITHUB_OUTPUT
- name: Upload Artifact Tarball
uses: actions/upload-artifact@v3
with:
name: vice-tarball
path: ${{ steps.build.outputs.tarball_path }}
retention-days: 1
- name: Upload Release Tarball
id: upload
uses: actions/github-script@v6
env:
UPLOAD_URL: ${{ needs.create_release.outputs.upload_url }}
ASSET_PATH: ${{ steps.build.outputs.tarball_path }}
ASSET_NAME: ${{ steps.build.outputs.tarball_name }}
ASSET_CONTENT_TYPE: application/gzip
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
const fs = require('fs');
const { UPLOAD_URL, ASSET_PATH, ASSET_NAME, ASSET_CONTENT_TYPE } = process.env;
const uploadAssetResponse = await github.rest.repos.uploadReleaseAsset({
url: UPLOAD_URL,
headers: {
'content-type': ASSET_CONTENT_TYPE,
'content-length': fs.statSync(ASSET_PATH).size
},
name: ASSET_NAME,
data: fs.readFileSync(ASSET_PATH)
});
build_doc:
name: Build Headless, Upload Documentation
needs: build_tarball
runs-on: ubuntu-latest
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Download Tarball
uses: actions/download-artifact@v3
with:
name: vice-tarball
- name: Unpack Source
shell: bash
run: |
tar xzvf vice-*.tar.gz
rm vice-*.tar.gz
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt-get -y install autoconf \
automake \
build-essential \
byacc \
dos2unix \
flex \
libcurl4-openssl-dev \
libpcap-dev \
texinfo \
texlive-fonts-recommended \
texlive-latex-extra \
xa65
- name: Build
id: build
shell: bash
run: |
cd vice-*/
./src/buildtools/genvicedate_h.sh
./autogen.sh
./configure --enable-option-checking=fatal \
--enable-headlessui \
--enable-html-docs \
--enable-pdf-docs \
--without-alsa \
--without-png \
--without-pulse
make -j2
echo "pdf_path=$(echo $(pwd)/doc/vice.pdf)" >> $GITHUB_OUTPUT
- name: Upload
uses: actions/upload-artifact@v3
with:
name: vice-pdf
path: ${{ steps.build.outputs.pdf_path }}
retention-days: 1
build:
name: Build
needs: [create_release, build_doc]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch:
- { msystem: MINGW64, arch: x86_64, prefix: mingw64 }
- { msystem: MINGW32, arch: i686, prefix: mingw32 }
ui: [ GTK3, SDL2 ]
steps:
- run: git config --global core.autocrlf input
shell: bash
- name: Checkout Source
uses: actions/checkout@v3
- name: Extract Github Actions Build Script
shell: bash
run: |
mv vice/build/github-actions/build-msys2.sh .
mv vice/build/github-actions/build-shared.sh .
ls -A1 | grep -v 'build-.*\.sh' | xargs rm -rf
- name: Download Documentation
uses: actions/download-artifact@v3
with:
name: vice-pdf
- name: Download Tarball
uses: actions/download-artifact@v3
with:
name: vice-tarball
- name: Unpack Tarball Source
shell: bash
run: |
tar xzvf vice-*.tar.gz
rm vice-*.tar.gz
mv vice-* vice
mv vice.pdf vice/doc/
mkdir -p vice/build/github-actions/
mv build-msys2.sh vice/build/github-actions/
mv build-shared.sh vice/build/github-actions/
- name: Install GTK3 Dependencies if Applicable
if: ${{ matrix.ui == 'GTK3' }}
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.arch.msystem }}
update: true
install: >-
autotools
base-devel
git
mingw-w64-${{ matrix.arch.arch }}-curl
mingw-w64-${{ matrix.arch.arch }}-docbook-xml
mingw-w64-${{ matrix.arch.arch }}-docbook-xsl
mingw-w64-${{ matrix.arch.arch }}-flac
mingw-w64-${{ matrix.arch.arch }}-giflib
mingw-w64-${{ matrix.arch.arch }}-glew
mingw-w64-${{ matrix.arch.arch }}-gtk3
mingw-w64-${{ matrix.arch.arch }}-icoutils
mingw-w64-${{ matrix.arch.arch }}-lame
mingw-w64-${{ matrix.arch.arch }}-libpcap
mingw-w64-${{ matrix.arch.arch }}-libvorbis
mingw-w64-${{ matrix.arch.arch }}-mpg123
mingw-w64-${{ matrix.arch.arch }}-ntldd
mingw-w64-${{ matrix.arch.arch }}-pkg-config
mingw-w64-${{ matrix.arch.arch }}-portaudio
mingw-w64-${{ matrix.arch.arch }}-toolchain
mingw-w64-${{ matrix.arch.arch }}-xa65
p7zip
subversion
unzip
xmlto
zip
- name: Install SDL2 Dependencies if Applicable
if: ${{ matrix.ui == 'SDL2' }}
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.arch.msystem }}
update: true
install: >-
autotools
base-devel
git
mingw-w64-${{ matrix.arch.arch }}-SDL2
mingw-w64-${{ matrix.arch.arch }}-SDL2_image
mingw-w64-${{ matrix.arch.arch }}-curl
mingw-w64-${{ matrix.arch.arch }}-docbook-xml
mingw-w64-${{ matrix.arch.arch }}-docbook-xsl
mingw-w64-${{ matrix.arch.arch }}-flac
mingw-w64-${{ matrix.arch.arch }}-giflib
mingw-w64-${{ matrix.arch.arch }}-glew
mingw-w64-${{ matrix.arch.arch }}-icoutils
mingw-w64-${{ matrix.arch.arch }}-lame
mingw-w64-${{ matrix.arch.arch }}-libpcap
mingw-w64-${{ matrix.arch.arch }}-libvorbis
mingw-w64-${{ matrix.arch.arch }}-mpg123
mingw-w64-${{ matrix.arch.arch }}-ntldd
mingw-w64-${{ matrix.arch.arch }}-pkg-config
mingw-w64-${{ matrix.arch.arch }}-portaudio
mingw-w64-${{ matrix.arch.arch }}-toolchain
mingw-w64-${{ matrix.arch.arch }}-xa65
p7zip
subversion
unzip
xmlto
zip
- name: Build and install libieee1284
id: build_libieee1284
shell: msys2 {0}
run: |
OLDDIR=$(pwd)
mkdir ~/work/
cd ~/work
git clone https://github.com/twaugh/libieee1284
cd libieee1284
export XML_CATALOG_FILES="/${{ matrix.arch.prefix }}/etc/xml/catalog"
./bootstrap
./configure --without-python
make CFLAGS="-Wno-incompatible-pointer-types"
make install
cd "$OLDDIR"
- name: Build
id: build
shell: msys2 {0}
run: |
MINGW_INSTALLS=${{ matrix.arch.msystem }} ./vice/build/github-actions/build-msys2.sh ${{ matrix.ui }} "release"
echo "zip_path=$(cygpath -w -a vice/*.zip)" >> $GITHUB_OUTPUT
echo "zip_name=$(basename vice/*.zip)" >> $GITHUB_OUTPUT
echo "seven_zip_path=$(cygpath -w -a vice/*.7z)" >> $GITHUB_OUTPUT
echo "seven_zip_name=$(basename vice/*.7z)" >> $GITHUB_OUTPUT
- name: Upload Zip
id: upload-zip
uses: actions/github-script@v6
env:
UPLOAD_URL: ${{ needs.create_release.outputs.upload_url }}
ASSET_PATH: ${{ steps.build.outputs.zip_path }}
ASSET_NAME: ${{ steps.build.outputs.zip_name }}
ASSET_CONTENT_TYPE: application/zip
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
const fs = require('fs');
const { UPLOAD_URL, ASSET_PATH, ASSET_NAME, ASSET_CONTENT_TYPE } = process.env;
const uploadAssetResponse = await github.rest.repos.uploadReleaseAsset({
url: UPLOAD_URL,
headers: {
'content-type': ASSET_CONTENT_TYPE,
'content-length': fs.statSync(ASSET_PATH).size
},
name: ASSET_NAME,
data: fs.readFileSync(ASSET_PATH)
});
- name: Upload 7Zip
id: upload-7zip
uses: actions/github-script@v6
env:
UPLOAD_URL: ${{ needs.create_release.outputs.upload_url }}
ASSET_PATH: ${{ steps.build.outputs.seven_zip_path }}
ASSET_NAME: ${{ steps.build.outputs.seven_zip_name }}
ASSET_CONTENT_TYPE: application/x-7z-compressed
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
const fs = require('fs');
const { UPLOAD_URL, ASSET_PATH, ASSET_NAME, ASSET_CONTENT_TYPE } = process.env;
const uploadAssetResponse = await github.rest.repos.uploadReleaseAsset({
url: UPLOAD_URL,
headers: {
'content-type': ASSET_CONTENT_TYPE,
'content-length': fs.statSync(ASSET_PATH).size
},
name: ASSET_NAME,
data: fs.readFileSync(ASSET_PATH)
});
build_deb:
name: Build Debian Package
needs: [create_release, build_doc]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ui: [ { name: 'GTK3',
conf: '--enable-gtk3ui --with-pulse',
deps: 'libglew-dev libgtk-3-dev libpulse-dev' },
{ name: 'SDL2',
conf: '--enable-sdl2ui --with-sdlsound --without-pulse',
deps: 'libsdl2-dev libsdl2-image-dev' },
{ name: 'SDL1',
conf: '--enable-sdl1ui --with-sdlsound --without-pulse',
deps: 'libsdl1.2-dev libsdl-image1.2-dev' },
{ name: 'Headless',
conf: '--enable-headlessui --with-pulse',
deps: 'libpulse-dev' } ]
steps:
- shell: bash
run: git config --global core.autocrlf input
- name: Checkout Source
uses: actions/checkout@v3
- name: Download Documentation
uses: actions/download-artifact@v3
with:
name: vice-pdf
path: vice/doc/
- name: Install Dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y autoconf \
automake \
build-essential \
byacc \
devscripts \
dos2unix \
fakeroot \
flex \
libasound-dev \
libcap-dev \
libcurl4-openssl-dev \
libflac-dev \
libgif-dev \
libieee1284-3-dev \
libmp3lame-dev \
libmpg123-dev \
libpcap-dev \
libpng-dev \
libvorbis-dev \
portaudio19-dev \
texinfo \
texlive-fonts-recommended \
texlive-latex-extra \
xa65
sudo apt install -y ${{ matrix.ui.deps }}
- name: Build
shell: bash
run: |
mkdir -p build/usr
cd vice
./src/buildtools/genvicedate_h.sh
./autogen.sh
# ALSA is required for SDL2 as well for midi support
./configure --enable-option-checking=fatal \
--prefix=/usr \
${{ matrix.ui.conf }} \
--disable-arch \
--disable-html-docs \
--enable-catweasel \
--enable-cpuhistory \
--enable-ethernet \
--enable-midi \
--enable-parsid \
--enable-pdf-docs \
--with-alsa \
--with-fastsid \
--with-flac \
--with-gif \
--with-lame \
--with-libcurl \
--with-libieee1284 \
--with-mpg123 \
--with-png \
--with-portaudio \
--with-resid \
--with-vorbis
make -j2 -s --no-print-directory
# Use install-strip, we want stripped binaries for point releases
make DESTDIR=$HOME/build install-strip
- name: Make Deb
id: make_deb
shell: bash
run: ./vice/build/github-actions/build-deb.sh ${{ matrix.ui.name }} release
- name: Upload Deb
id: upload_deb
uses: actions/github-script@v6
env:
UPLOAD_URL: ${{ needs.create_release.outputs.upload_url }}
ASSET_PATH: ${{ steps.make_deb.outputs.deb_path }}
ASSET_NAME: ${{ steps.make_deb.outputs.deb_name }}
ASSET_CONTENT_TYPE: application/vnd.debian.binary-package
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
const fs = require('fs');
const { UPLOAD_URL, ASSET_PATH, ASSET_NAME, ASSET_CONTENT_TYPE } = process.env;
const uploadAssetResponse = await github.rest.repos.uploadReleaseAsset({
url: UPLOAD_URL,
headers: {
'content-type': ASSET_CONTENT_TYPE,
'content-length': fs.statSync(ASSET_PATH).size
},
name: ASSET_NAME,
data: fs.readFileSync(ASSET_PATH)
});
publish_release:
name: Publish Release
needs: [create_release, build]
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
retries: 3
script: |
await github.rest.repos.updateRelease(
{
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ needs.create_release.outputs.release_id }},
draft: false
});