diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ac5360..117eb22 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,47 +14,20 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set up MSYS2 for 32-bit + - name: Set up MSYS2 uses: msys2/setup-msys2@v2 with: - msystem: MINGW32 + msystem: MINGW64 update: true - install: mingw-w64-i686-toolchain + install: mingw-w64-x86_64-toolchain - - name: Install p7zip + - name: Install dependencies (libusb and curl) run: | pacman -Syu --noconfirm - pacman -S --needed --noconfirm p7zip - shell: msys2 {0} - - - name: Install libusb 1.0.27 - run: | - wget -q https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.7z -O libusb.7z - 7z x libusb.7z -o./libusb - mkdir -p /mingw32/include/libusb-1.0 - cp -r libusb/include/* /mingw32/include/libusb-1.0/ - cp -r libusb/MinGW32/dll/* /mingw32/lib/ - shell: msys2 {0} - - - name: Install curl - run: | - pacman -Syu --noconfirm - pacman -S --needed --noconfirm mingw-w64-i686-curl - shell: msys2 {0} - - - name: Compile aes.c and md5.c - run: | - gcc -c libs/aes.c -o libs/aes.o - gcc -c libs/md5.c -o libs/md5.o + 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 main.c libs/aes.o libs/md5.o -o test.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 }} ./test.exe --clobber - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file + gcc -o main.exe main.c libs/*.c -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl + shell: msys2 {0} \ No newline at end of file