Skip to content

Commit

Permalink
missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
eltorio committed Sep 23, 2023
1 parent 48e2f8e commit 27068bd
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 6 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/multiarch-docker-hub-x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Ce workflow utilise des actions qui ne sont pas certifiées par GitHub.
# Elles sont fournies par un tiers et régies par
# des conditions d’utilisation du service, une politique de confidentialité et un support distincts.
# documentation en ligne.

# GitHub recommande d’épingler les actions à un SHA de commit.
# Pour obtenir une version plus récente, vous devez mettre à jour le SHA.
# Vous pouvez également référencer une balise ou une branche, mais l’action peut changer sans avertissement.

name: Publish amd64/arm64 to docker Hub
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3.4.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v5
with:
platforms: 'arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.4.0
with:
images: ${{ secrets.DOCKER_IMAGE_NAME }}-x86

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64, linux/amd64
push: true
build-args: |
MSVC_ARCH=x86
LLVM_ARCH=i686
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,28 @@ With /usr/share/msvc/test/test.sh you can test a full compilation and executable
test.sh contains:
```sh
#!/bin/bash
$CC_x86_64_pc_windows_msvc $CL_FLAGS /I include /c src/test.c /Fotest.o
$CC_x86_64_pc_windows_msvc $CL_FLAGS /I include /c src/MainWindow.c /FoMainWindow.o
$CC_x86_64_pc_windows_msvc $CL_FLAGS /I include /c src/AboutDialog.c /FoAboutDialog.o
$CL /I include /c src/test.c
$CL /I include /c src/MainWindow.c
$CL /I include /c src/AboutDialog.c

$LINK_x86_64_pc_windows_msvc /libpath:$MSVC_BASE/sdk/lib/um/x86_64 /libpath:$MSVC_BASE/sdk/lib/ucrt/x86_64 /libpath:$MSVC_BASE/crt/lib/x86_64 \
/subsystem:WINDOWS \
$LINK /subsystem:WINDOWS \
user32.lib kernel32.lib comctl32.lib \
test.o MainWindow.o AboutDialog.o \
test.obj MainWindow.obj AboutDialog.obj \
/out:test.exe
```

# Disclaimer
I build this for my own use, it corresponds to my need, if you need to adapt it to your needs feel free to fork and adapt…

# Docker
## x86_64 (for arm64 and amd64 linux hosts)
```
docker push highcanfly/llvm4msvc:latest
```
## (work in progress) x86 (for arm64 and amd64 linux hosts)
```
docker push highcanfly/llvm4msvc-x86:latest
```
# Shortcuts

| | |
Expand Down
10 changes: 10 additions & 0 deletions test/src/simpletest.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBoxW(NULL,
L"Everything is working !",
L"Hello World", MB_OK);
return 0;
}

0 comments on commit 27068bd

Please sign in to comment.