From 3bcd9c93399c78c40add3180a14dee86670bff6f Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Mon, 3 Jun 2024 10:46:10 -0700 Subject: [PATCH] Additional work on GH actions (#46) * Additional work on GH actions * Add Win build and artifact naming * Add Mac x86-64 --- .github/workflows/build-macos-arm.yml | 35 +++++++++++++++++++++++++++ .github/workflows/build-macos.yml | 34 ++++++++++++++++++++++++++ .github/workflows/build-windows.yml | 23 +++++++----------- 3 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/build-macos-arm.yml create mode 100644 .github/workflows/build-macos.yml diff --git a/.github/workflows/build-macos-arm.yml b/.github/workflows/build-macos-arm.yml new file mode 100644 index 0000000..f008a0a --- /dev/null +++ b/.github/workflows/build-macos-arm.yml @@ -0,0 +1,35 @@ +# Manually started action to build Picotool and OpenOCD for Mac and upload to an artifact + + +name: Build MacOS ARM +on: [workflow_dispatch] +jobs: + build: + runs-on: macos-14 + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '14.3.1' + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Build mklittlefs MacARM + run: | + rm -f *.json *.gz *.zip + pfx=aarch64-apple-darwin20 + AHOST=aarch64-apple-darwin TARGET_OS=osx CC=gcc CXX=g++ STRIP=strip mingw32-make clean mklittlefs BUILD_CONFIG_NAME="-arduino" CPPFLAGS="" + - name: Package mklittlefs Mac86 + run: | + name=mklittlefs-$(git rev-parse --short HEAD) + mkdir -p tmp/mklittlefs + mv mklittlefs tmp/mklittlefs/. + cd tmp + zip -rq ../aarch64-apple-darwin-${name}.zip mklittlefs + cd .. + rm -rf tmp + - name: Upload mklittlefs MacARM + uses: actions/upload-artifact@v4 + with: + name: aarch64-apple-darwin-mklittlefs.zip + path: aarch64-apple-darwin-mklittlefs-*.zip diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 0000000..61e0935 --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,34 @@ +# Manually started action to build Picotool and OpenOCD for Mac and upload to an artifact + +name: Build MacOS +on: [workflow_dispatch] +jobs: + build: + runs-on: macos-12 + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '13.1.0' + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Build mklittlefs Mac86 + run: | + rm -f *.json *.gz *.zip + pfx=x86_64-apple-darwin20 + AHOST=x86_64-apple-darwin TARGET_OS=osx CC=gcc CXX=g++ STRIP=strip mingw32-make clean mklittlefs BUILD_CONFIG_NAME="-arduino" CPPFLAGS="" + - name: Package mklittlefs Mac86 + run: | + name=mklittlefs-$(git rev-parse --short HEAD) + mkdir -p tmp/mklittlefs + mv mklittlefs tmp/mklittlefs/. + cd tmp + zip -rq ../x86_64-apple-darwin-${name}.zip mklittlefs + cd .. + rm -rf tmp + - name: Upload mklittlefs Mac86 + uses: actions/upload-artifact@v4 + with: + name: x86_64-apple-darwin-mklittlefs.zip + path: x86_64-apple-darwin-mklittlefs-*.zip diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 2df5786..d28eb03 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -17,31 +17,26 @@ jobs: - uses: msys2/setup-msys2@v2 with: msystem: ${{matrix.sys}} - install: development mingw-w64-${{matrix.env}}-make mingw-w64-${{matrix.env}}-pkg-config mingw-w64-${{matrix.env}}-autotools texinfo mingw-w64-${{matrix.env}}-libusb mingw-w64-${{matrix.env}}-hidapi git mingw-w64-${{matrix.env}}-toolchain patch mingw-w64-${{matrix.env}}-cmake pkg-config + install: development mingw-w64-${{matrix.env}}-make git mingw-w64-${{matrix.env}}-toolchain zip - uses: actions/checkout@v4 with: submodules: true - name: Build mklittlefs ${{matrix.env}} run: | rm -f *.json *.gz *.zip - name=mklittlefs-$(git rev-parse --short HEAD) pfx=${{matrix.env}}-w64-mingw32 - exe=.exe - AHOST=${{matrix.env}}-mingw32 TARGET_OS=windows CC=${pfx}-gcc CXX=${pfx}-g++ STRIP=${pfx}-strip make clean mklittlefs${exe} BUILD_CONFIG_NAME="-arduino-esp8266" CPPFLAGS="-DSPIFFS_USE_MAGIC_LENGTH=0 -DSPIFFS_ALIGNED_OBJECT_INDEX_TABLES=1" + AHOST=${{matrix.env}}-mingw32 TARGET_OS=windows CC=${pfx}-gcc CXX=${pfx}-g++ STRIP=strip mingw32-make clean mklittlefs.exe BUILD_CONFIG_NAME="-arduino" CPPFLAGS="" + - name: Package mklittlefs ${{matrix.env}} + run: | + name=mklittlefs-$(git rev-parse --short HEAD) mkdir -p tmp/mklittlefs - mv mklittlefs${exe} tmp/mklittlefs/. + mv mklittlefs.exe tmp/mklittlefs/. cd tmp - if [ "${exe}" == "" ]; then - tarball=${pfx}-$name.tar.gz - tar zcvf ../${tarball} mklittlefs - else - tarball=${pfx}-$name.zip - zip -rq ../${tarball} mklittlefs - fi + zip -rq ../${{matrix.env}}-w64-mingw32-${name}.zip mklittlefs cd .. rm -rf tmp - name: Upload mklittlefs ${{matrix.env}} uses: actions/upload-artifact@v4 with: - name: ${{matrix.env}}-w64-mingw32.${{matrix.env}}.tar - path: openocd.${{matrix.env}}.tar + name: ${{matrix.env}}-w64-mingw32-mklittlefs.zip + path: ${{matrix.env}}-w64-mingw32-mklittlefs-*.zip