Fix palette for -colour-analog. #4235
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Snapshot Build | |
on: | |
push: | |
tags: | |
- 'r[0-9]+' # any tag name that looks like an svn commit | |
concurrency: | |
group: Snapshot Build | |
cancel-in-progress: true | |
jobs: | |
cleanup_previous_builds: # Delete unfinished draft prereleases, and prereleases older than 30 days (but keep at least 10) | |
name: Cleanup Previous Builds | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
retries: 3 | |
script: | | |
// Get a list of all releases, sorted newest first | |
let releases = | |
(await github.paginate( | |
github.rest.repos.listReleases, | |
{ | |
owner: context.repo.owner, | |
repo: context.repo.repo | |
})) | |
.sort((a,b) => b.created_at.localeCompare(a.created_at)); | |
let releaseCount = 0; | |
let releasesToDelete = []; | |
// Initiate deletion of draft prereleases | |
for (const release of releases) | |
{ | |
// Only cleanup prereleases | |
if (!release.prerelease) | |
continue; | |
// Failed builds leave drafts - delete them | |
if (release.draft) | |
{ | |
console.log("Will delete draft prerelease: " + release.tag_name); | |
releasesToDelete.push(release.id); | |
continue; | |
} | |
// Keep at least 10, no matter how old | |
if (++releaseCount <= 10) | |
continue; | |
// We have more than 10 releases - delete those more than 30 days old | |
let daysAgo = Math.floor((new Date() - Date.parse(release.created_at)) / 1000 / 60 / 60 / 24); | |
if (daysAgo <= 30) | |
continue; | |
console.log("Will delete old prerelease: " + release.tag_name); | |
releasesToDelete.push(release.id); | |
} | |
if (releasesToDelete.length) | |
{ | |
let promises = []; | |
for (const id of releasesToDelete) | |
{ | |
promises.push( | |
github.rest.repos.deleteRelease( | |
{ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
release_id: id | |
})); | |
} | |
console.log("Waiting for deletions to complete"); | |
await Promise.all(promises); | |
} | |
console.log("Done."); | |
create_release: | |
name: Create Draft Release | |
needs: cleanup_previous_builds | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
release_id: ${{ steps.create_release.outputs.release_id }} | |
steps: | |
- uses: actions/github-script@v6 | |
id: create_release | |
env: | |
TAG_NAME: ${{ github.ref }} | |
RELEASE_NAME: ${{ github.ref }} snapshot | |
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: true, | |
target_commitish: context.sha | |
}); | |
core.setOutput('release_id', createReleaseResponse.data.id); | |
core.setOutput('upload_url', createReleaseResponse.data.upload_url); | |
build_doc: | |
name: Style check, Test Headless, Build Documentation | |
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 | |
sudo apt-get -y install texinfo texlive-fonts-recommended texlive-latex-extra libpcap-dev | |
- name: Build | |
id: build | |
shell: bash | |
run: | | |
cd vice | |
./src/buildtools/genvicedate_h.sh | |
./autogen.sh | |
./configure --enable-headlessui --enable-pdf-docs --enable-html-docs --without-pulse --without-alsa --without-png | |
make stylecheck | |
make | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vice-pdf | |
path: vice/doc/vice.pdf | |
retention-days: 1 | |
- name: Upload Release Asset | |
uses: actions/github-script@v6 | |
env: | |
UPLOAD_URL: ${{ needs.create_release.outputs.upload_url }} | |
ASSET_PATH: vice/doc/vice.pdf | |
ASSET_NAME: vice.pdf | |
ASSET_CONTENT_TYPE: application/pdf | |
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: | |
name: Build | |
needs: [create_release, build_doc] | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- { msystem: MINGW64, arch: x86_64 } | |
- { msystem: MINGW32, arch: i686 } | |
ui: [ GTK3, SDL2, SDL1 ] | |
steps: | |
- run: git config --global core.autocrlf input | |
shell: bash | |
- name: Checkout Source | |
uses: actions/checkout@v3 | |
- name: Download Documentation | |
uses: actions/download-artifact@v3 | |
with: | |
name: vice-pdf | |
path: vice/doc/ | |
- name: Install GTK3 Dependencies if Applicable | |
if: ${{ matrix.ui == 'GTK3' }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.arch.msystem }} | |
update: true | |
install: >- | |
git | |
base-devel | |
autotools | |
mingw-w64-${{ matrix.arch.arch }}-toolchain | |
unzip | |
zip | |
p7zip | |
subversion | |
mingw-w64-${{ matrix.arch.arch }}-pkg-config | |
mingw-w64-${{ matrix.arch.arch }}-ntldd | |
mingw-w64-${{ matrix.arch.arch }}-glew | |
mingw-w64-${{ matrix.arch.arch }}-giflib | |
mingw-w64-${{ matrix.arch.arch }}-lame | |
mingw-w64-${{ matrix.arch.arch }}-libvorbis | |
mingw-w64-${{ matrix.arch.arch }}-flac | |
mingw-w64-${{ matrix.arch.arch }}-icoutils | |
mingw-w64-${{ matrix.arch.arch }}-libpcap | |
mingw-w64-${{ matrix.arch.arch }}-libusb | |
mingw-w64-${{ matrix.arch.arch }}-curl | |
mingw-w64-${{ matrix.arch.arch }}-gtk3 | |
mingw-w64-${{ matrix.arch.arch }}-xa65 | |
- name: Install SDL2 Dependencies if Applicable | |
if: ${{ matrix.ui == 'SDL2' }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.arch.msystem }} | |
update: true | |
install: >- | |
git | |
base-devel | |
autotools | |
mingw-w64-${{ matrix.arch.arch }}-toolchain | |
unzip | |
zip | |
p7zip | |
subversion | |
mingw-w64-${{ matrix.arch.arch }}-pkg-config | |
mingw-w64-${{ matrix.arch.arch }}-ntldd | |
mingw-w64-${{ matrix.arch.arch }}-glew | |
mingw-w64-${{ matrix.arch.arch }}-giflib | |
mingw-w64-${{ matrix.arch.arch }}-lame | |
mingw-w64-${{ matrix.arch.arch }}-libvorbis | |
mingw-w64-${{ matrix.arch.arch }}-flac | |
mingw-w64-${{ matrix.arch.arch }}-icoutils | |
mingw-w64-${{ matrix.arch.arch }}-libpcap | |
mingw-w64-${{ matrix.arch.arch }}-libusb | |
mingw-w64-${{ matrix.arch.arch }}-curl | |
mingw-w64-${{ matrix.arch.arch }}-SDL2 | |
mingw-w64-${{ matrix.arch.arch }}-SDL2_image | |
mingw-w64-${{ matrix.arch.arch }}-xa65 | |
- name: Install SDL1 Dependencies if Applicable | |
if: ${{ matrix.ui == 'SDL1' }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.arch.msystem }} | |
update: true | |
install: >- | |
git | |
base-devel | |
autotools | |
mingw-w64-${{ matrix.arch.arch }}-toolchain | |
unzip | |
zip | |
p7zip | |
subversion | |
mingw-w64-${{ matrix.arch.arch }}-pkg-config | |
mingw-w64-${{ matrix.arch.arch }}-ntldd | |
mingw-w64-${{ matrix.arch.arch }}-glew | |
mingw-w64-${{ matrix.arch.arch }}-giflib | |
mingw-w64-${{ matrix.arch.arch }}-lame | |
mingw-w64-${{ matrix.arch.arch }}-libvorbis | |
mingw-w64-${{ matrix.arch.arch }}-flac | |
mingw-w64-${{ matrix.arch.arch }}-icoutils | |
mingw-w64-${{ matrix.arch.arch }}-libpcap | |
mingw-w64-${{ matrix.arch.arch }}-libusb | |
mingw-w64-${{ matrix.arch.arch }}-curl | |
mingw-w64-${{ matrix.arch.arch }}-SDL | |
mingw-w64-${{ matrix.arch.arch }}-SDL_image | |
mingw-w64-${{ matrix.arch.arch }}-xa65 | |
- name: Build | |
id: build | |
shell: msys2 {0} | |
run: | | |
MINGW_INSTALLS=${{ matrix.arch.msystem }} ./vice/build/github-actions/build-msys2.sh ${{ matrix.ui }} "$(echo "${{ github.ref }}" | sed 's,.*/,,')" | |
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 xa65 | |
sudo apt install -y libasound-dev libflac-dev libgif-dev libmp3lame-dev \ | |
libmpg123-dev libpcap-dev libpng-dev libvorbis-dev libcurl4-openssl-dev | |
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 --enable-arch=no \ | |
--enable-ethernet --disable-pdf-docs --disable-html-docs \ | |
--with-fastsid --with-resid --enable-cpuhistory --with-gif \ | |
--with-png --with-vorbis --with-flac --with-mpg123 --with-lame \ | |
--enable-midi --with-alsa --with-libcurl ${{ matrix.ui.conf }} | |
make -j2 -s --no-print-directory SVN_REVISION_OVERRIDE=$(echo "${{ github.ref }}" | sed 's/^.*r//') | |
# Don't use install-strip, we want symbols intact for backtraces | |
make DESTDIR=$HOME/build install | |
- name: Make Deb | |
id: make_deb | |
shell: bash | |
run: ./vice/build/github-actions/build-deb.sh ${{ matrix.ui.name }} | |
- 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 | |
}); | |
build_error_notify: | |
name: IRC Notification of Build Errors | |
needs: [cleanup_previous_builds, create_release, build_doc, build, publish_release] | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} | |
steps: | |
- shell: bash | |
run: git config --global core.autocrlf input | |
- name: Checkout Source | |
uses: actions/checkout@v3 | |
- name: Notify IRC of Build Failure | |
env: | |
IRC_PASS: ${{ secrets.IRC_PASS }} | |
shell: bash | |
run: | | |
./vice/build/github-actions/irc-message.sh "tried to build $(echo "${{ github.ref }}" | sed 's,.*/,,') but it failed :( $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" |