ci: Build xemu-win64-toolchain container image

This commit is contained in:
Matt Borgerson 2023-01-13 17:37:46 -07:00 committed by mborgerson
parent 92b62d942f
commit e44e78fa06
3 changed files with 65 additions and 8 deletions

View File

@ -0,0 +1,49 @@
name: Build xemu-win64-toolchain
on:
push:
paths:
- '.github/workflows/build-xemu-win64-toolchain.yml'
- 'ubuntu-win64-cross/**'
pull_request:
paths:
- '.github/workflows/build-xemu-win64-toolchain.yml'
- 'ubuntu-win64-cross/**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: xemu-win64-toolchain
jobs:
build-image:
name: Build and Publish Image
if: github.repository_owner == 'xemu-project'
runs-on: ubuntu-latest
steps:
- name: Clone tree
uses: actions/checkout@v3
- name: Extract image metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4.3.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.2.1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v3.2.0
with:
context: ubuntu-win64-cross
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -4,13 +4,15 @@ on:
push:
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- '!.github/workflows/build.yml'
- 'README.md'
- 'ubuntu-win64-cross/**'
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- '!.github/workflows/build.yml'
- 'README.md'
- 'ubuntu-win64-cross/**'
jobs:
Init:

View File

@ -2,14 +2,15 @@
# Environment to cross-compile xemu for Windows
#
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV MXE_VERSION=1707285df63b8590ce6b91c7ff3a5b56e3cc8980
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get -qy install \
software-properties-common \
lsb-release \
git \
autoconf \
automake \
autopoint \
@ -26,6 +27,7 @@ RUN apt-get update \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libgl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
@ -35,7 +37,10 @@ RUN apt-get update \
p7zip-full \
patch \
perl \
python \
python3 \
python3-mako \
python3-pkg-resources \
python-is-python3 \
ruby \
sed \
unzip \
@ -47,9 +52,10 @@ RUN apt-get update \
RUN cd /opt \
&& git clone https://github.com/mxe/mxe.git \
&& make -C /opt/mxe \
MXE_TARGETS=x86_64-w64-mingw32.static \
MXE_PLUGIN_DIRS=plugins/gcc10 \
&& cd mxe \
&& git checkout ${MXE_VERSION} \
&& make MXE_TARGETS=x86_64-w64-mingw32.static \
MXE_PLUGIN_DIRS=plugins/gcc10 \
cc \
glib \
libepoxy \