diff options
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/bins.yml | 83 | ||||
-rw-r--r-- | .github/workflows/c-cpp.yml | 5 | ||||
-rw-r--r-- | .github/workflows/check-md-links.yml | 11 | ||||
-rw-r--r-- | .github/workflows/musl-build-image.yml | 45 | ||||
-rw-r--r-- | .github/workflows/rpmbuild.yml | 2 |
5 files changed, 132 insertions, 14 deletions
diff --git a/.github/workflows/bins.yml b/.github/workflows/bins.yml index 27a9a04..9fd2133 100644 --- a/.github/workflows/bins.yml +++ b/.github/workflows/bins.yml @@ -5,9 +5,14 @@ on: branches: - master paths-ignore: - - docs + - 'docs/**' + - 'test/**' - README.md - NEWS.md + - .github/actions/muslbuilder/Dockerfile + - .github/actions/muslbuilder/entrypoint.sh + - .github/workflows/musl-build-image.yml + - '.github/ISSUE_TEMPLATE/**' workflow_call: inputs: lnav_version_number: @@ -20,13 +25,14 @@ on: type: string jobs: - build-musl: + build-musl-x86_64: runs-on: ubuntu-latest container: - image: tstack/lnav-build:1 + image: tstack/lnav-build:latest + options: --platform linux/amd64 env: LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }} - LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-x86_64-linux-musl.zip + LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-linux-musl-x86_64.zip steps: - name: checkout uses: actions/checkout@v3 @@ -37,7 +43,7 @@ jobs: run: >- mkdir ${{ env.LNAV_BASENAME }} && cd ${{ env.LNAV_BASENAME }} && - cp ../NEWS.md ../README . && + cp ../NEWS.md ../README ../lnav.1 . && cp ../lbuild/src/lnav . && cd .. && zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }} @@ -45,7 +51,7 @@ jobs: uses: actions/upload-artifact@v3 with: # Artifact name - name: lnav-linux-musl-64bit.zip + 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 @@ -59,6 +65,59 @@ jobs: asset_name: ${{ env.LNAV_ZIPNAME }} asset_content_type: application/octet-stream + build-arm: + runs-on: ubuntu-latest + if: false + strategy: + matrix: + include: + - container-platform: linux/arm/v7 + arch: armv7l + - container-platform: linux/arm64 + arch: aarch64 + env: + LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }} + LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-linux-musl-${{ matrix.arch }}.zip + LNAV_ARTIFACT: lnav-linux-musl-${{ matrix.arch }}.zip + steps: + - name: checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: make + uses: addnab/docker-run-action@v3 + with: + image: tstack/lnav-build:latest + options: -v ${{ github.workspace }}:/lnav -e GITHUB_WORKSPACE=/lnav --platform ${{ matrix.container-platform }} + run: /entrypoint.sh + - name: Build musl package + if: ${{ inputs.lnav_version_number != '' }} + run: >- + cd ${{ github.workspace }} && + mkdir ${{ env.LNAV_BASENAME }} && + cd ${{ env.LNAV_BASENAME }} && + cp ../NEWS.md ../README ../lnav.1 . && + 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: ${{ env.LNAV_ARTIFACT }} + # A file, directory or wildcard pattern that describes what to upload + path: ${{ github.workspace }}/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: ${{ github.workspace }}/${{ env.LNAV_ZIPNAME }} + asset_name: ${{ env.LNAV_ZIPNAME }} + asset_content_type: application/octet-stream + build-macos: runs-on: macos-12 env: @@ -82,7 +141,7 @@ jobs: "LDFLAGS=-L$(brew --prefix ncurses)/lib -L$(brew --prefix xz)/lib -L$(brew --prefix zstd)/lib/" \ --with-readline=$(brew --prefix readline) \ --with-libarchive=$(brew --prefix libarchive) \ - "LIBS=-llzma -lzstd -lbrotlidec-static -liconv -llz4" + "LIBS=-llzma -lzstd -liconv -llz4" - name: make run: make -j2 - name: Build macos package @@ -90,18 +149,20 @@ jobs: run: >- mkdir ${{ env.LNAV_BASENAME }} && cd ${{ env.LNAV_BASENAME }} && - cp ../NEWS.md ../README . && + cp ../NEWS.md ../README ../lnav.1 . && cp ../src/lnav . && cd .. && zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }} - - name: Upload config.log artifact + - name: Upload build artifacts uses: actions/upload-artifact@v3 if: ${{ always() }} with: # Artifact name - name: config-log.zip + name: lnav-macos-x86_64.zip # A file, directory or wildcard pattern that describes what to upload - path: config.log + path: | + config.log + src/lnav - name: Upload macos archive uses: actions/upload-release-asset@v1.0.2 if: ${{ inputs.upload_url != '' }} diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 66188af..d053a25 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -71,8 +71,11 @@ jobs: libbz2-dev libcurl4-openssl-dev libreadline-dev + pipx tshark zlib1g-dev + - name: Install python packages + run: pipx install check-jsonschema - name: autogen run: ./autogen.sh - name: configure @@ -141,7 +144,7 @@ jobs: CPPFLAGS="-I../src -I../../lnav/src -I../../lnav/src/fmtlib -O2 -DNCURSES_STATIC" \ CXXFLAGS="-fPIC" \ CFLAGS="-fPIC" \ - LIBS="-larchive -lssh2 -llzma -llz4 -lz -lzstd -lssl -lcrypto -liconv -lunistring -lbrotlicommon" \ + LIBS="-larchive -lssh2 -llzma -llz4 -lz -lzstd -lssl -lcrypto -liconv -lunistring -lbrotlicommon -lcrypt32" \ --sysconfdir=/etc \ --prefix=$PREFIX || cat config.log - name: '🚧 Make (do not use -j)' diff --git a/.github/workflows/check-md-links.yml b/.github/workflows/check-md-links.yml index f55b468..ef17d24 100644 --- a/.github/workflows/check-md-links.yml +++ b/.github/workflows/check-md-links.yml @@ -1,6 +1,15 @@ name: Check Markdown links -on: push +on: + push: + paths: + - '**.md' + - .github/workflows/check-md-links.yml + + schedule: + # The markdown files are not frequently modified. So run the job at least + # once every week. + - cron: '30 1 * * TUE' jobs: markdown-link-check: diff --git a/.github/workflows/musl-build-image.yml b/.github/workflows/musl-build-image.yml new file mode 100644 index 0000000..75b39a3 --- /dev/null +++ b/.github/workflows/musl-build-image.yml @@ -0,0 +1,45 @@ +name: musl-build-image + +on: + push: + branches: master + paths: + - .github/actions/muslbuilder/Dockerfile + - .github/actions/muslbuilder/entrypoint.sh + - .github/workflows/musl-build-image.yml + +concurrency: + group: musl-build-image + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + env: + CONTAINER_TAG: tstack/lnav-build:latest + steps: + - + name: checkout code + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Build and push + uses: docker/build-push-action@v4 + with: + context: ${{ github.workspace }}/.github/actions/muslbuilder/ + platforms: linux/amd64, linux/arm/v7, linux/arm64 + push: true + tags: ${{ env.CONTAINER_TAG }} + cache-from: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache + cache-to: type=registry,ref=${{ env.CONTAINER_TAG }}-buildcache,mode=max diff --git a/.github/workflows/rpmbuild.yml b/.github/workflows/rpmbuild.yml index 67e6d83..a32c150 100644 --- a/.github/workflows/rpmbuild.yml +++ b/.github/workflows/rpmbuild.yml @@ -15,7 +15,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get the release version from the tag shell: bash |