Build Mi-Assistant #216
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Mi-Assistant | |
on: | |
workflow_dispatch: | |
env: | |
VERSION: 1.1 | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up MSYS2 for 32-bit | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
update: true | |
install: mingw-w64-i686-toolchain | |
- name: Install p7zip | |
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 | |
shell: msys2 {0} | |
- name: Compile main.c with aes.o and md5.o | |
run: | | |
gcc main.c libs/aes.o libs/md5.o -o main.exe -L/mingw32/lib -Ilibs -I/mingw32/include -lusb-1.0 -lcurl | |
shell: msys2 {0} |