2022-01-05 22:01:59 +03:00
|
|
|
# Runs on any push to ci-linux-arm32v7.
|
|
|
|
# Produces optimised static arm32v7 linux binaries,
|
|
|
|
# using GHC 8.10.4 and cabal.
|
|
|
|
# Currently runs no tests.
|
|
|
|
# Slow, will probably time out.
|
|
|
|
|
2022-06-06 13:58:34 +03:00
|
|
|
name: binaries-linux-arm32v7-static
|
2021-07-01 07:05:27 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-08-18 05:19:42 +03:00
|
|
|
branches: [ binaries-linux-arm32v7-static ]
|
2021-07-01 07:05:27 +03:00
|
|
|
#tags:
|
|
|
|
# - '[0-9]+.[0-9]+'
|
|
|
|
# - '[0-9]+.[0-9]+-*'
|
|
|
|
# - '[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
# - '[0-9]+.[0-9]+.[0-9]+-*'
|
2021-07-04 03:51:17 +03:00
|
|
|
workflow_dispatch:
|
2021-07-01 07:05:27 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-27 00:49:47 +03:00
|
|
|
- name: Set up QEMU
|
2021-07-01 07:05:27 +03:00
|
|
|
uses: docker/setup-qemu-action@v1
|
2022-07-27 00:49:47 +03:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2021-07-01 07:05:27 +03:00
|
|
|
uses: docker/setup-buildx-action@v1
|
2022-07-27 00:49:47 +03:00
|
|
|
|
|
|
|
- name: Build and push
|
2021-07-01 07:05:27 +03:00
|
|
|
id: docker_build
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
file: ./docker-static-arm32v7/Dockerfile
|
|
|
|
platforms: linux/arm
|
2021-07-06 02:24:55 +03:00
|
|
|
tags: hledger-linux-static-arm32v7:latest
|
2021-07-01 07:05:27 +03:00
|
|
|
load: true
|
|
|
|
|
2022-07-27 00:49:47 +03:00
|
|
|
- name: Gather binaries from docker
|
2021-07-01 07:05:27 +03:00
|
|
|
run: |
|
2021-07-06 02:24:55 +03:00
|
|
|
container_id=$(docker create hledger-linux-static-arm32v7:latest)
|
2022-07-27 00:49:47 +03:00
|
|
|
docker cp $container_id:/root/hledger tmp
|
2021-07-01 07:05:27 +03:00
|
|
|
docker rm -v $container_id
|
2022-07-27 00:49:47 +03:00
|
|
|
cd tmp
|
2022-07-27 01:27:53 +03:00
|
|
|
tar cvf hledger-linux-static-arm32v7.tar hledger hledger-ui hledger-web
|
2021-07-01 07:05:27 +03:00
|
|
|
|
2022-07-27 01:27:53 +03:00
|
|
|
# upload-artifact loses execute permissions, so we tar the binaries to preserve them.
|
|
|
|
# github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar.
|
|
|
|
# Unfortunately it means users must both unzip and untar.
|
2022-07-27 00:49:47 +03:00
|
|
|
- name: Upload binaries artifact
|
2022-07-27 00:37:44 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-07-01 07:05:27 +03:00
|
|
|
with:
|
2021-07-06 02:24:55 +03:00
|
|
|
name: hledger-linux-static-arm32v7
|
2022-07-27 01:27:53 +03:00
|
|
|
path: tmp/hledger-linux-static-arm32v7.tar
|