Skip to content

CORE: SOCKETAPI/Windows: using native error query #992

CORE: SOCKETAPI/Windows: using native error query

CORE: SOCKETAPI/Windows: using native error query #992

Workflow file for this run

name: CI
on:
push:
branches:
- master
- next
- dev
pull_request:
branches:
- master
- next
- dev
workflow_dispatch:
branches:
- master
- next
- dev
inputs:
deploy:
description: 'Do you want DEPLOYMENT onto the download page?'
required: false
default: 'false'
jobs:
linux-native:
name: Linux native build
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install Ubuntu packages
run: |
sudo apt-get -y -yq update || true
sudo apt-get -y -yq --no-install-suggests --no-install-recommends install alien bash bison build-essential bzip2 coreutils curl deborphan dpkg fakeroot file gawk gcc libc6-dev libc-bin libcurl4-openssl-dev libgtk-3-dev libreadline6-dev libsdl2-dev lsb-release make sed tar util-linux vim-common wget zip jq
- name: List of all installed packages
run: dpkg -l | cat || true
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Show SDL2 status
run: |
ls -l `which sdl2-config` || true
sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
- name: Configure Xemu
run: make RELEASE=yes OFFICIALBUILD=yes config
- name: Build Xemu
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes
- name: Strip and list of result binaries
run: for a in build/bin/*.native ; do ls -l $a ; strip $a ; ls -l $a ; done
- name: Test run of MEGA65 emulator
run: build/bin/xmega65.native -h || true
- name: Create DEB package to be deployed
if: env.should_deploy == 'true'
run: |
make RELEASE=yes OFFICIALBUILD=yes deb
cp build/bin/*.deb build/bin/*.rpm .
ls -l *.deb *.rpm
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-linux-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Native Linux Builder"
git config --global user.email "[email protected]"
build/deploy/before-deploy.sh xemu-deploy Linux
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "Ubuntu Linux DEB" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
linux-for-windows:
name: Windows build on Linux
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install Ubuntu packages
run: |
sudo apt-get -y -yq update || true
sudo apt-get -y -yq --no-install-suggests --no-install-recommends install alien bash binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 bison build-essential bzip2 coreutils curl deborphan dpkg fakeroot file gawk gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 lsb-release make sed tar util-linux vim-common wget zip nsis jq
- name: List of all installed packages
run: dpkg -l | cat || true
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Install Windows SDL2 cross-development components
run: build/install-cross-win-mingw-sdl-on-linux.sh /usr/bin
- name: Show Windows SDL2 status
run: |
echo "*** 64-bit Windows SDL2 status ***"
ls -l `which x86_64-w64-mingw32-sdl2-config` || true
x86_64-w64-mingw32-sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
echo "*** 32-bit Windows SDL2 status ***"
ls -l `which i686-w64-mingw32-sdl2-config` || true
i686-w64-mingw32-sdl2-config --version --prefix --exec-prefix --cflags --libs --static-libs || true
- name: Configure Xemu (64-bit)
run: make RELEASE=yes OFFICIALBUILD=yes ARCH=win64 config
- name: Build Xemu (64-bit)
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes ARCH=win64
- name: Strip and list of result binaries (64-bit)
run: for a in build/bin/*.win64 ; do ls -l $a ; x86_64-w64-mingw32-strip $a ; ls -l $a ; done
- name: Configure Xemu (32-bit)
if: env.should_deploy == 'true'
run: make RELEASE=yes OFFICIALBUILD=yes ARCH=win32 config
- name: Build Xemu (32-bit)
if: env.should_deploy == 'true'
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes ARCH=win32
- name: Strip and list of result binaries (32-bit)
if: env.should_deploy == 'true'
run: for a in build/bin/*.win32 ; do ls -l $a ; i686-w64-mingw32-strip $a ; ls -l $a ; done
- name: Build ZIP acrhive (64-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `x86_64-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/zipper.sh build/bin xemu-binaries-win64.zip build/bin/*.dll build/bin/*.win64 README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-win64.zip .
- name: Build installer (64-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `x86_64-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/nsi-build-native.sh win64
cp build/bin/install-xemu-win64.exe .
- name: Build ZIP archive (32-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `i686-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/zipper.sh build/bin xemu-binaries-win32.zip build/bin/*.dll build/bin/*.win32 README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-win32.zip .
- name: Build installer (32-bit)
if: env.should_deploy == 'true'
run: |
rm -f build/bin/*.dll
cp README.md LICENSE AUTHORS `i686-w64-mingw32-sdl2-config --prefix`/bin/*.dll build/bin/
build/nsi-build-native.sh win32
cp build/bin/install-xemu-win32.exe .
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-windows-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Linux Windows Builder"
git config --global user.email "[email protected]"
build/deploy/before-deploy.sh xemu-deploy Windows
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "Windows" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true
macos:
name: MacOS native build
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set custom build variables
uses: ./.github/actions/set-custom-build-variables
- name: Check deployment request status
if: env.should_deploy == 'true'
run: echo "ENABLED (if you see this)"
- name: Current builder/repo info
run: |
echo "Running builder at `pwd` as `whoami`@`hostname` on `uname -a`"
echo "--- GIT INFO ---"
bash build/show-git-info | tee /tmp/show-git-info || true
echo "--- CURRENT DIRECTORY ---"
pwd
ls -la
echo "--- PARENT DIRECTORY ---"
ls -la ..
- name: Show shell variables
run: env | grep -Evi 'SECRET|TOKEN|HOOK|SECURE|_ID|_SHA' || true
- name: Install build/deployment dependencies
run: build/install-dependencies-osx.sh
- name: Show build system info
run: bash build/show-sys-info.sh
- name: Show Mac SDL2 status
run: |
ls -l `which sdl2-config` || true
sdl2-config --version --prefix --cflags --libs --static-libs || true
- name: Configure Xemu
run: make RELEASE=yes OFFICIALBUILD=yes MACMINVER=10.6 config
- name: Build Xemu
run: make -j 4 RELEASE=yes OFFICIALBUILD=yes MACMINVER=10.6
- name: Mangle, strip and list of result binaries
run: |
for a in build/bin/*.native ; do build/mangle_dylib_osx.sh $a ; strip $a ; ls -l $a ; lipo -info $a ; done
echo "--- DYLIB INFO ---"
ls -l build/bin/*.dylib || true
lipo -info build/bin/*.dylib || true
- name: Test run of MEGA65 emulator
run: build/bin/xmega65.native -h || true
- name: Create ZIP archive
if: env.should_deploy == 'true'
run: |
cp README.md LICENSE AUTHORS build/bin/
build/zipper.sh build/bin xemu-binaries-osx.zip build/bin/*.dylib build/bin/*.native README.md LICENSE AUTHORS
cp build/bin/xemu-binaries-osx.zip .
ls -l *.zip
- name: Create DMG installer
if: env.should_deploy == 'true'
run: build/dmg-osx-creator.sh
- name: Install additional utilities
if: env.should_deploy == 'true'
run: |
for a in jq coreutils ; do echo "Checking if brew package $a is installed" ; brew list $a &>/dev/null || brew install $a ; done
ls -l `which jq` `which md5sum`
- name: Deploy
if: env.should_deploy == 'true'
env:
TARGET_BRANCH: binary-osx-${{ github.ref_name }}
XEMU_DEPLOY_TOKEN: ${{ secrets.XEMU_DEPLOY_TOKEN }}
COMMIT_MESSAGE: Deploy from ${{ github.repository }}@${{ github.sha }}
run: |
git config --global user.name "Xemu Native Mac Builder"
git config --global user.email "[email protected]"
build/deploy/before-deploy.sh xemu-deploy MacOS
cd xemu-deploy
../build/deploy/git-deploy-forced-push.sh
cd ..
- name: Announce deployment
if: env.should_deploy == 'true'
env:
CI_SYSTEM_OVERRIDE: Github Actions
DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK }}
DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK: ${{ secrets.DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK }}
run: build/deploy/discord-webhook.sh success "MacOS(x86)" ANY:DISCORD_XEMU_SERVER_TEST_CHANNEL_WEBHOOK master,next:DISCORD_MEGA65_SERVER_XEMU_CHANNEL_WEBHOOK || true