Skip to content

Commit

Permalink
Address issue #2.
Browse files Browse the repository at this point in the history
This commit contains no new code or features; rather it is a
significant re-work to the user docs (i.e. README.org) along
with the provision of pre-built binaries & a Debian binary
package.
  • Loading branch information
sp1ff committed Dec 17, 2020
1 parent 9b0562b commit 7481747
Show file tree
Hide file tree
Showing 10 changed files with 1,055 additions and 53 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
set -x
sudo apt-get update
sudo apt-get install -y autoconf automake emacs
set +x
- name: Install Tools (macOS)
if: matrix.os == 'macos-10.15'
Expand All @@ -64,7 +63,6 @@ jobs:
set -x
brew update
brew install autoconf automake emacs
set +x
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand All @@ -73,12 +71,16 @@ jobs:
profile: minimal
override: true

- name: Install additional Rust tooling
shell: bash
run: |
cargo install cargo-deb
- name: Configure mpdpopm
shell: bash
run: |
set -x
./bootstrap && ./configure
set +x
- name: Build mpdpopm
run: make
Expand All @@ -98,7 +100,6 @@ jobs:
cat "$stderr"
echo "====="
fi
set +x
- name: Run unit test suite
shell: bash
Expand All @@ -107,8 +108,17 @@ jobs:
cd mpdpopm
pwd
cargo test --verbose
set +x
- name: Check the Autotools distribution
shell: bash
run: make distcheck

- name: Check the Debian package
if: matrix.os == 'ubuntu-18.04'
shell: bash
run: |
set -x
cd mpdpopm
cargo deb
48 changes: 37 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
# <https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml>
name: release
on:
# TODO(sp1ff): I would *like* to allow this workflow to be triggered
# manually, which is what this event allegedly does
# <https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow>
# but it doesn't work. I'm wondering if it has something to do with
# the fact that, at the time of this writing, I'm on the
# release-infra branch?
# This permits this workflow to be triggered manually. See the
# environment variable RELEASE_VERSION below, however.
workflow_dispatch:
# Modifying the push event with 'branches' and 'tags' seems to be an OR operation (i.e. the workflow
# will run if either on branch release-infra *or* it has a tag of n.n.n)
# Modifying the push event with 'branches' and 'tags' seems to be an
# OR operation (i.e. the workflow will run if either on branch
# release-infra *or* it has a tag of n.n.n)
push:
# Un-comment this for testing
# branches:
Expand Down Expand Up @@ -89,8 +86,7 @@ jobs:
run: |
pwd
set -x
sudo apt-get update
sudo apt-get install -y autoconf automake emacs
sudo apt-get install -y autoconf automake emacs liblzma-dev
set +x
- name: Install Tools (macOS)
Expand All @@ -110,6 +106,11 @@ jobs:
profile: minimal
override: true

- name: Install additional Rust tooling
shell: bash
run: |
cargo install cargo-deb
- name: Configure mpdpopm
shell: bash
run: |
Expand Down Expand Up @@ -142,6 +143,7 @@ jobs:
- name: Strip release binary (linux and macos)
if: matrix.build == 'linux' || matrix.build == 'macos'
shell: bash
run: |
cd mpdpopm
strip target/release/mppopmd
Expand All @@ -157,7 +159,6 @@ jobs:
cp -v mpdpopm/target/release/mppopm{,d} "$staging/bin"
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
set +x
- name: Upload release archive
uses: actions/[email protected]
Expand Down Expand Up @@ -201,3 +202,28 @@ jobs:
asset_path: ${{ env.DISTRO_XZ }}
asset_name: ${{ env.DISTRO_XZ }}
asset_content_type: application/octet-stream

- name: Make Debian package
if: matrix.os == 'ubuntu-18.04'
shell: bash
# You would think I can deduce the name of the package from
# RELEASE_VERSION, but Debian uses different designatures for
# architecture (amd64 instead of x86_64, e.g.) than those
# produced by `uname'. Since there will only be one .deb in the
# output directory, I'll just figure it out that way.
run: |
set -x
cd mpdpopm
cargo deb
echo "DEBIAN_PKG=$(ls target/debian/*.deb)" >> $GITHUB_ENV
- name: Upload Debian package
if: matrix.os == 'ubuntu-18.04'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.RELEASE_UPLOAD_URL }}
asset_path: ${{ env.DEBIAN_PKG }}
asset_name: ${{ env.DEBIAN_PKG }}
asset_content_type: application/octet-stream
25 changes: 25 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
2020-12-16 Michael Herstine <[email protected]>

Address issue #2.
This commit contains no new code or features; rather it is a
significant re-work to the user docs (i.e. README.org) along
with the provision of pre-built binaries & a Debian binary
package.

2020-11-24 Michael Herstine <[email protected]>

Hopefully, my final workflow commit.
1. Re-comment the version
2. Change the build-release job to only upload source Autotools
distros for Ubuntu

Hard-coding the release version preparatory to forcing a release.

Updated the README with up-to-date installation instructions.

Adding a release workflow.

2020-11-22 Michael Herstine <[email protected]>

Committing my first GitHub Actions workflow

2020-11-18 Michael Herstine <[email protected]>

Bugfix for issue #1.
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile-arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- Dockerfile -*-
FROM archlinux:latest

RUN useradd build && \
passwd -d build && \
mkdir /home/build && \
chown build:build /home/ild && \
pacman -Sy --noconfirm gcc sudo && \
sudo -u build bash -c "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y" && \
sudo -u build bash -c "source /home/build/.cargo/env && cargo install cargo-arch"
Loading

0 comments on commit 7481747

Please sign in to comment.