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
57 changes: 0 additions & 57 deletions .github/AppImageBuilder.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/appimage.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: upload

on:
push:
branches: [master]
release:
types: [published]

jobs:
build-static:
name: build static binary
runs-on: ubuntu-latest
container:
image: ghcr.io/linux-nvme/debian:latest
outputs:
VERSION: ${{ steps.build.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: build
id: build
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
VERSION="$(git describe --always --abbrev=12 --dirty)"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo $VERSION

scripts/build.sh static
mkdir upload
cp .build-ci/nvme upload/nvme-cli-latest-x86_64
if [ "${GITHUB_EVENT_NAME}" = "release" ]; then
cp .build-ci/nvme "upload/nvme-cli-${VERSION}-x86_64"
fi

- uses: actions/upload-artifact@v4
name: upload artifacts to github
with:
name: nvme-cli
path: upload/*

upload-test-binary:
name: upload test binary
runs-on: ubuntu-latest
needs: build-static
if: ${{ github.event_name == 'push' || github.event_name == 'release' }}
steps:
- uses: actions/download-artifact@v4
with:
name: nvme-cli
path: upload

- name: FTP Deployer
uses: sand4rt/[email protected]
with:
sftp: true
host: ${{ secrets.SFTP_SERVER }}
port: 22
username: ${{ secrets.SFTP_USERNAME }}
password: ${{ secrets.SFTP_PASSWORD }}
remote_folder: '/upload'
local_folder: upload
cleanup: false
include: '[ "nvme-cli-*" ]'
exclude: '[".github/**", ".git/**", "*.env"]'

upload-release-assets:
name: upload GitHub release assets
runs-on: ubuntu-latest
needs: build-static
env:
VERSION: ${{ needs.build-static.outputs.VERSION }}
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/download-artifact@v4
with:
name: nvme-cli
path: upload
- name: upload versioned binary
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: upload/nvme-cli-${{ env.VERSION }}-x86_64
asset_name: nvme-cli-${{ env.VERSION }}-x86_64
asset_content_type: application/octet-stream
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static:
meson setup ${BUILD-DIR} --buildtype=release \
--wrap-mode=forcefallback \
--default-library=static \
--prefix=/usr \
-Dc_link_args="-static" \
-Dlibnvme:default_library=static \
-Dlibnvme:keyutils=disabled \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ sees the complete file.

## Testing

For testing purposes a x86_64 AppImage is build from the current HEAD and is
For testing purposes a x86_64 static build from the current HEAD and is
available here:

https://monom.org/linux-nvme/upload/AppImage/nvme-cli-latest-x86_64.AppImage
https://monom.org/linux-nvme/upload/nvme-cli-latest-x86_64
17 changes: 1 addition & 16 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ usage() {
echo " and build them as shared libraries"
echo " cross use cross toolchain to build"
echo " coverage build coverage report"
echo " appimage build AppImage target"
echo " distro build libnvme and nvme-cli separately"
echo " docs build documentation"
echo " static build a static binary"
Expand Down Expand Up @@ -108,16 +107,6 @@ config_meson_coverage() {
"${BUILDDIR}"
}

config_meson_appimage() {
CC="${CC}" "${MESON}" setup \
--werror \
--buildtype="${BUILDTYPE}" \
--force-fallback-for=libnvme \
--prefix=/usr \
Comment thread
MaisenbacherD marked this conversation as resolved.
-Dlibnvme:werror=false \
"${BUILDDIR}"
}

config_meson_docs() {
CC="${CC}" "${MESON}" setup \
-Ddocs=all \
Expand All @@ -133,6 +122,7 @@ config_meson_static() {
--buildtype=release \
--default-library=static \
--wrap-mode=forcefallback \
--prefix=/usr \
-Dc_link_args="-static" \
-Dlibnvme:keyutils=disabled \
"${BUILDDIR}"
Expand All @@ -154,11 +144,6 @@ test_meson_coverage() {
ninja -C "${BUILDDIR}" coverage --verbose
}

install_meson_appimage() {
"${MESON}" install \
-C "${BUILDDIR}"
}

install_meson_docs() {
"${MESON}" install \
-C "${BUILDDIR}"
Expand Down
Loading