diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 117eb22..5c6fe26 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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} \ No newline at end of file + 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 \ No newline at end of file