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

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

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

- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-toolchain

- name: Install dependencies (libusb and curl)
- name: Install dependencies for cross-compilation (libusb, curl, and mingw-w64)
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl
shell: msys2 {0}
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

- name: Compile main.c with aes.o and md5.o
- name: Compile main.c with aes.o and md5.o for Windows
run: |
gcc -o main.exe main.c libs/*.c -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl
shell: msys2 {0}
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

0 comments on commit 5339469

Please sign in to comment.