Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 76 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: libgoldilocks pipeline
on: push
jobs:
build:
build-mac:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, raspbian-private, macos-latest]
runs-on: ${{ matrix.platform }}
config:
- {os: macos-13, path: darwin-x86_64, arch: x86_64}
- {os: macos-latest, path: darwin-arm64, arch: arm64}
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build Linux
if: ${{ matrix.platform == 'ubuntu-latest' || matrix.platform == 'raspbian-private'}}
run: |
mkdir -p src/.libs
docker build . -t libgoldilocks:${{matrix.platform}}
docker create -it --name dummy libgoldilocks:${{matrix.platform}} bash
docker cp dummy:/usr/local/bin/libgoldilocks.a src/.libs/libgoldilocks.a
docker rm -f dummy
- name: Build Mac
if: ${{ matrix.platform == 'macos-latest' }}
uses: actions/checkout@v4
- name: Build
run: |
brew install automake
brew install automake libtool
autoreconf --install && ./configure && make all
- name: Upload
uses: actions/upload-artifact@v3
with:
name: libgoldilocks-darwin-${{ matrix.config.arch }}
path: src/.libs/libgoldilocks.a

build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Win
if: ${{ matrix.platform == 'windows-latest' }}
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
Expand All @@ -34,50 +37,87 @@ jobs:
autoconf
automake
libtool
mingw-w64-x86_64-toolchain
- name: Build Windows
if: ${{ matrix.platform == 'windows-latest' }}
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-binutils
mingw-w64-x86_64-libwinpthread-git
- name: Build
shell: msys2 {0}
run: |
autoreconf --install && ./configure && make all
- name: Upload
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: libgoldilocks-windows-x86_64
path: src/.libs/libgoldilocks.a

build-alpine:
strategy:
matrix:
config:
- {arch: x86_64, branch: latest-stable}
- {arch: aarch64, branch: latest-stable}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Alpine Linux
uses: jirutka/setup-alpine@v1
with:
arch: ${{ matrix.config.arch }}
branch: ${{ matrix.config.branch }}
- name: Install deps
shell: alpine.sh --root {0}
run: |
apk add automake autoconf libtool make gcc g++
- name: Build
shell: alpine.sh --root {0}
run: |
autoreconf --install && ./configure && make all
- name: Upload
uses: actions/upload-artifact@v3
with:
name: libgoldilocks-${{matrix.platform}}
name: libgoldilocks-linux-${{ matrix.config.arch }}
path: src/.libs/libgoldilocks.a

release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: build
needs: [build-mac, build-windows, build-alpine]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Download Linux lib
uses: actions/download-artifact@v2
- name: Linux x86_64
uses: actions/download-artifact@v3
with:
name: libgoldilocks-ubuntu-latest
name: libgoldilocks-linux-x86_64
path: linux-x86_64
- name: Download Raspbian lib
uses: actions/download-artifact@v2
- name: Linux arm64
uses: actions/download-artifact@v3
with:
name: libgoldilocks-raspbian-private
name: libgoldilocks-linux-aarch64
path: linux-arm64
- name: Download Mac lib
uses: actions/download-artifact@v2
- name: Darwin x86_64
uses: actions/download-artifact@v3
with:
name: libgoldilocks-macos-latest
name: libgoldilocks-darwin-x86_64
path: darwin-x86_64
- name: Download Win lib
uses: actions/download-artifact@v2
- name: Darwin arm64
uses: actions/download-artifact@v3
with:
name: libgoldilocks-darwin-arm64
path: darwin-arm64
- name: Win x86_64
uses: actions/download-artifact@v3
with:
name: libgoldilocks-windows-latest
name: libgoldilocks-windows-x86_64
path: windows-x86_64
- name: Create zip
run: |
zip -r libgoldilocks linux-x86_64 linux-arm64 darwin-x86_64 windows-x86_64
zip -r libgoldilocks linux-x86_64 linux-arm64 darwin-x86_64 darwin-arm64 windows-x86_64
- name: Bump version
id: version_bump
uses: anothrNick/github-tag-action@1.13.0
uses: anothrNick/github-tag-action@1.37.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: "patch"
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.