2023-06-12 04:08:28 +00:00
|
|
|
name: bins
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-06-12 15:30:49 +00:00
|
|
|
paths-ignore:
|
|
|
|
- docs
|
2023-06-29 12:53:36 +00:00
|
|
|
- README.md
|
|
|
|
- NEWS.md
|
2023-06-14 19:54:53 +00:00
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
lnav_version_number:
|
|
|
|
description: The version number of the release
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
upload_url:
|
|
|
|
description: The URL to upload release assets
|
|
|
|
required: false
|
|
|
|
type: string
|
2023-06-12 04:08:28 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-07-08 13:04:07 +00:00
|
|
|
build-musl-x86_64:
|
2023-06-12 04:08:28 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-12 12:59:05 +00:00
|
|
|
container:
|
2023-07-08 12:45:01 +00:00
|
|
|
image: tstack/lnav-build:latest
|
|
|
|
options: --platform linux/amd64
|
2023-06-14 19:54:53 +00:00
|
|
|
env:
|
|
|
|
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
|
2023-06-14 21:24:44 +00:00
|
|
|
LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-x86_64-linux-musl.zip
|
2023-06-12 04:08:28 +00:00
|
|
|
steps:
|
2023-06-12 15:30:49 +00:00
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-06-12 04:08:28 +00:00
|
|
|
- name: make
|
2023-06-12 12:59:05 +00:00
|
|
|
run: /entrypoint.sh
|
2023-06-14 19:54:53 +00:00
|
|
|
- name: Build musl package
|
|
|
|
if: ${{ inputs.lnav_version_number != '' }}
|
|
|
|
run: >-
|
2023-06-14 21:37:21 +00:00
|
|
|
mkdir ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cd ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cp ../NEWS.md ../README . &&
|
|
|
|
cp ../lbuild/src/lnav . &&
|
|
|
|
cd .. &&
|
2023-06-14 19:54:53 +00:00
|
|
|
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
|
2023-06-12 15:30:49 +00:00
|
|
|
- name: Upload a Build Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
# Artifact name
|
2023-07-08 13:04:07 +00:00
|
|
|
name: lnav-linux-musl-x86_64.zip
|
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
|
|
|
path: lbuild/src/lnav
|
|
|
|
- name: Upload musl-binary archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
if: ${{ inputs.upload_url != '' }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ inputs.upload_url }}
|
|
|
|
asset_path: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_name: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
|
|
|
|
build-musl-armv7l:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
|
|
|
|
LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-armv7l-linux-musl.zip
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-07-08 15:28:26 +00:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Run the armv7l Docker builder
|
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
|
with:
|
|
|
|
image: tstack/lnav-build:latest
|
|
|
|
options: -v ${{ github.workspace }}:/lnav -e GITHUB_WORKSPACE=/lnav --platform linux/arm/v7
|
|
|
|
run: /entrypoint.sh
|
2023-07-08 13:04:07 +00:00
|
|
|
- name: Build musl package
|
|
|
|
if: ${{ inputs.lnav_version_number != '' }}
|
|
|
|
run: >-
|
2023-07-08 15:28:26 +00:00
|
|
|
cd ${{ github.workspace }}
|
2023-07-08 13:04:07 +00:00
|
|
|
mkdir ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cd ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cp ../NEWS.md ../README . &&
|
|
|
|
cp ../lbuild/src/lnav . &&
|
|
|
|
cd .. &&
|
|
|
|
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
|
|
|
|
- name: Upload a Build Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
# Artifact name
|
|
|
|
name: lnav-linux-musl-armv7l.zip
|
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
2023-07-08 15:28:26 +00:00
|
|
|
path: ${{ github.workspace }}/lbuild/src/lnav
|
2023-07-08 13:04:07 +00:00
|
|
|
- name: Upload musl-binary archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
if: ${{ inputs.upload_url != '' }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ inputs.upload_url }}
|
2023-07-08 15:28:26 +00:00
|
|
|
asset_path: ${{ github.workspace }}/${{ env.LNAV_ZIPNAME }}
|
2023-07-08 13:04:07 +00:00
|
|
|
asset_name: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
|
|
|
|
build-musl-arm64v8:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: tstack/lnav-build:latest
|
|
|
|
options: --platform linux/arm64
|
|
|
|
env:
|
|
|
|
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
|
|
|
|
LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-aarch64-linux-musl.zip
|
|
|
|
steps:
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: make
|
|
|
|
run: /entrypoint.sh
|
|
|
|
- name: Build musl package
|
|
|
|
if: ${{ inputs.lnav_version_number != '' }}
|
|
|
|
run: >-
|
|
|
|
mkdir ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cd ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cp ../NEWS.md ../README . &&
|
|
|
|
cp ../lbuild/src/lnav . &&
|
|
|
|
cd .. &&
|
|
|
|
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
|
|
|
|
- name: Upload a Build Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
# Artifact name
|
|
|
|
name: lnav-linux-musl-aarch64.zip
|
2023-06-12 15:30:49 +00:00
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
2023-06-12 15:41:46 +00:00
|
|
|
path: lbuild/src/lnav
|
2023-06-14 19:54:53 +00:00
|
|
|
- name: Upload musl-binary archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
if: ${{ inputs.upload_url != '' }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2023-06-14 21:50:30 +00:00
|
|
|
upload_url: ${{ inputs.upload_url }}
|
2023-06-14 19:54:53 +00:00
|
|
|
asset_path: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_name: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_content_type: application/octet-stream
|
2023-06-14 23:15:10 +00:00
|
|
|
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-12
|
|
|
|
env:
|
|
|
|
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
|
|
|
|
LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-x86_64-macos.zip
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install packages
|
2023-06-14 23:21:08 +00:00
|
|
|
run: brew install pcre2 sqlite ncurses xz zstd readline libarchive curl autoconf automake
|
2023-06-14 23:15:10 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: >-
|
2023-06-15 04:36:11 +00:00
|
|
|
./configure --enable-static \
|
2023-06-15 05:45:13 +00:00
|
|
|
--with-libcurl=/usr \
|
2023-06-15 04:40:02 +00:00
|
|
|
--with-pcre2=$(brew --prefix pcre2) \
|
|
|
|
--with-sqlite3=$(brew --prefix sqlite3) \
|
2023-06-15 13:16:01 +00:00
|
|
|
"CXXFLAGS=-I$(brew --prefix ncurses)/include -g2 -O2" \
|
2023-06-15 04:36:11 +00:00
|
|
|
'CFLAGS=-O2 -g2' \
|
2023-06-15 13:16:01 +00:00
|
|
|
"LDFLAGS=-L$(brew --prefix ncurses)/lib -L$(brew --prefix xz)/lib -L$(brew --prefix zstd)/lib/" \
|
2023-06-15 04:40:02 +00:00
|
|
|
--with-readline=$(brew --prefix readline) \
|
|
|
|
--with-libarchive=$(brew --prefix libarchive) \
|
2023-06-15 13:16:01 +00:00
|
|
|
"LIBS=-llzma -lzstd -lbrotlidec-static -liconv -llz4"
|
2023-06-14 23:15:10 +00:00
|
|
|
- name: make
|
|
|
|
run: make -j2
|
|
|
|
- name: Build macos package
|
|
|
|
if: ${{ inputs.lnav_version_number != '' }}
|
|
|
|
run: >-
|
|
|
|
mkdir ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cd ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cp ../NEWS.md ../README . &&
|
2023-06-15 04:30:27 +00:00
|
|
|
cp ../src/lnav . &&
|
2023-06-14 23:15:10 +00:00
|
|
|
cd .. &&
|
|
|
|
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
|
2023-06-15 04:30:27 +00:00
|
|
|
- name: Upload config.log artifact
|
2023-06-14 23:15:10 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-06-15 04:30:27 +00:00
|
|
|
if: ${{ always() }}
|
2023-06-14 23:15:10 +00:00
|
|
|
with:
|
|
|
|
# Artifact name
|
2023-06-15 04:30:27 +00:00
|
|
|
name: config-log.zip
|
2023-06-14 23:15:10 +00:00
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
2023-06-15 04:30:27 +00:00
|
|
|
path: config.log
|
2023-06-14 23:15:10 +00:00
|
|
|
- name: Upload macos archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
if: ${{ inputs.upload_url != '' }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ inputs.upload_url }}
|
|
|
|
asset_path: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_name: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_content_type: application/octet-stream
|