From 811c441e8089ed81d70d2628ceb1b7e3f99aeecc Mon Sep 17 00:00:00 2001 From: offici5l <127665988+offici5l@users.noreply.github.com> Date: Sat, 2 Nov 2024 15:26:30 +0100 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7b9d31..042c88d 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,24 +8,19 @@ env: jobs: build: - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - - name: Install MinGW - run: | - choco install mingw -y - refreshenv - - - name: Install dependencies (libusb and curl) - run: | - pacman -Syu --noconfirm - pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl - shell: msys2 {0} + - name: Set up Docker + run: docker pull mcr.microsoft.com/mysys2 - - name: Compile main.c with aes.o and md5.o + - name: Build with Docker 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} \ No newline at end of file + docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace mcr.microsoft.com/mysys2 /bin/bash -c " + pacman -Syu --noconfirm && \ + pacman -S --needed --noconfirm mingw-w64-x86_64-libusb mingw-w64-x86_64-curl && \ + gcc -o main.exe main.c libs/*.c -L/mingw64/lib -Ilibs -I/mingw64/include -lusb-1.0 -lcurl + " \ No newline at end of file