Skip to content

Commit

Permalink
Use one dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Mar 2, 2024
1 parent 59351a2 commit e73c3bf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 116 deletions.
File renamed without changes.
22 changes: 15 additions & 7 deletions .github/workflows/deploy.yml → .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
name: Deploy
name: Docker
on:
push:
branches:
- master
- deploy
- docker

jobs:
deploy:
name: Deploy
docker:
name: Docker
runs-on: ubuntu-latest
strategy:
matrix:
target: [ i686-w64-mingw32.static, x86_64-w64-mingw32.static, i686-w64-mingw32.shared, x86_64-w64-mingw32.shared ]
arch: [ i686, x86_64 ]
build_type: [ release, debug ]
lib_type: [ static, shared ]
steps:

- name: Set MXE build type
run: echo "mxe_build_type=$(echo ${{matrix.build_type}} | tr '[:upper:]' '[:lower:]' | sed 's/.*/\u&/')" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v4

Expand All @@ -32,6 +37,9 @@ jobs:
- name: Push to DockerHub
uses: docker/build-push-action@v5
with:
file: ./dockerfiles/${{matrix.target}}
file: ./docker/Dockerfile
build-args: |
MXE_TARGET=${{matrix.arch}}-w64-mingw32.${{matrix.lib_type}}
MXE_BUILD_TYPE=${{env.mxe_build_type}}
tags: jonaski/strawberry-mxe-${{matrix.arch}}-${{matrix.build_type}}:latest
push: true
tags: jonaski/mxe-qt-${{matrix.target}}:latest
9 changes: 8 additions & 1 deletion dockerfiles/x86_64-w64-mingw32.static → docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
FROM opensuse/tumbleweed

ARG MXE_TARGET=x86_64-w64-mingw32.static
ARG MXE_BUILD_TYPE=Debug

COPY / /mxe-qt

RUN ls -la

RUN cd mxe-qt && ls -la

RUN zypper -n ar -c -f -n 'repo-mingw' https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Tumbleweed/ repo-mingw

RUN zypper -n --gpg-auto-import-keys ref
Expand Down Expand Up @@ -33,4 +40,4 @@ RUN mkdir -p /tmp/inetc && wget https://nsis.sourceforge.io/mediawiki/images/c/c
RUN cd /tmp/inetc && unzip /tmp/inetc/Inetc.zip
RUN cp /tmp/inetc/Plugins/x86-unicode/INetC.dll /usr/share/nsis/Plugins/x86-unicode/

RUN cd mxe-qt && make -j 4 MXE_TARGETS="x86_64-w64-mingw32.static" MXE_BUILD_TYPE="Debug" MXE_VERBOSE=1
RUN cd mxe-qt && make -j 4 MXE_TARGETS="${MXE_TARGET}" MXE_BUILD_TYPE="${MXE_BUILD_TYPE}" MXE_VERBOSE=1
36 changes: 0 additions & 36 deletions dockerfiles/i686-w64-mingw32.shared

This file was deleted.

36 changes: 0 additions & 36 deletions dockerfiles/i686-w64-mingw32.static

This file was deleted.

36 changes: 0 additions & 36 deletions dockerfiles/x86_64-w64-mingw32.shared

This file was deleted.

0 comments on commit e73c3bf

Please sign in to comment.