Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
offici5l authored Nov 2, 2024
1 parent 109db12 commit 811c441
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@ env:

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install MinGW
run: |
choco install mingw -y
refreshenv
- name: Install dependencies (libusb and curl)
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl
shell: msys2 {0}
- name: Set up Docker
run: docker pull mcr.microsoft.com/mysys2

- name: Compile main.c with aes.o and md5.o
- name: Build with Docker
run: |
gcc -o main.exe main.c libs/aes.o libs/md5.o -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl
shell: msys2 {0}
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcr.microsoft.com/mysys2 /bin/bash -c "
pacman -Syu --noconfirm && \
pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl && \
gcc -o main.exe main.c libs/*.c -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl
"

0 comments on commit 811c441

Please sign in to comment.