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 dbcd76f commit 7991422
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,58 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up MSYS2
- name: Set up MSYS2 for 64-bit
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 (libusb and curl) for 64-bit
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl
shell: msys2 {0}

- name: Compile aes.c and md5.c
- name: Set up MSYS2 for 32-bit
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-toolchain

- name: Install dependencies (libusb and curl) for 32-bit
run: |
pacman -Syu --noconfirm
pacman -S --needed --noconfirm mingw-w64-i686-libusb mingw-w64-i686-curl
shell: msys2 {0}

- name: Compile aes.c and md5.c for 32-bit
run: |
gcc -c libs/aes.c -o libs/aes.o
gcc -c libs/md5.c -o libs/md5.o
shell: msys2 {0}

- name: Compile main.c with aes.o and md5.o
- name: Compile main.c with aes.o and md5.o for 32-bit
run: |
gcc main.c libs/aes.o libs/md5.o -o main.exe -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl
gcc main.c libs/aes.o libs/md5.o -o main32.exe -L/mingw32/lib -Ilibs -I/mingw32/include -lusb-1.0 -lcurl
shell: msys2 {0}


- name: Upload Release Assets
run: |
gh release upload ${{ env.VERSION }} ./main32.exe --clobber
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}


- name: Compile aes.c and md5.c for 64-bit
run: |
gcc -c libs/aes.c -o libs/aes.o
gcc -c libs/md5.c -o libs/md5.o
shell: msys2 {0}

- name: Verify the Build
- name: Compile main.c with aes.o and md5.o for 64-bit
run: |
./main.exe
gcc main.c libs/aes.o libs/md5.o -o main64.exe -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl
shell: msys2 {0}

0 comments on commit 7991422

Please sign in to comment.