Skip to content

Commit

Permalink
Additional work on GH actions (#46)
Browse files Browse the repository at this point in the history
* Additional work on GH actions

* Add Win build and artifact naming

* Add Mac x86-64
  • Loading branch information
earlephilhower authored Jun 3, 2024
1 parent 29d974a commit 3bcd9c9
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 14 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-macos-arm.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 9 additions & 14 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3bcd9c9

Please sign in to comment.