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 5339469 commit 109db12
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ env:

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

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

- name: Install dependencies for cross-compilation (libusb, curl, and mingw-w64)
- name: Install MinGW
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64 libcurl4-openssl-dev
sudo apt-get install -y gcc-mingw-w64-x86-64
shell: bash
choco install mingw -y
refreshenv
- name: Compile main.c with aes.o and md5.o for Windows
- name: Install dependencies (libusb and curl)
run: |
x86_64-w64-mingw32-gcc -o main.exe main.c libs/*.c -L/usr/x86_64-w64-mingw32/lib -Ilibs -lusb-1.0 -lcurl
shell: bash
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl
shell: msys2 {0}

- name: Compile main.c with aes.o and md5.o
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}

0 comments on commit 109db12

Please sign in to comment.