summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-03-10 05:15:48 -0500
committerGitHub <noreply@github.com>2022-03-10 05:15:48 -0500
commit8087f0b636b94ff5763a3a5637dea9a343784bd7 (patch)
tree3429a410bde0feef39424e87bbe99c0ba7b4f20c /.github
parent92ec3599363c710815c286e975bbb6cc748708dd (diff)
ci: add manpage generation, migrate build script (#692)
Adds manpage generation to the build process, as well as following the xtask concept of adding additional build scripts that only need to run on deploy/nightly as opposed to `build.rs`. Note this doesn't follow the recommended method of using workplaces because I don't really want to shift the entire repo structure just for this. More on xtask: https://github.com/matklad/cargo-xtask
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/deployment.yml23
-rw-r--r--.github/workflows/nightly.yml17
2 files changed, 29 insertions, 11 deletions
diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml
index 1d981d95..e5dcb4fe 100644
--- a/.github/workflows/deployment.yml
+++ b/.github/workflows/deployment.yml
@@ -82,11 +82,7 @@ jobs:
target: "i686-unknown-linux-musl",
cross: true,
}
- - {
- os: "macOS-latest",
- target: "x86_64-apple-darwin",
- cross: false,
- }
+ - { os: "macOS-latest", target: "x86_64-apple-darwin", cross: false }
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
@@ -152,11 +148,15 @@ jobs:
args: --release --verbose --target=${{ matrix.triple.target }} --features "battery"
use-cross: ${{ matrix.triple.cross }}
- - name: Move autocomplete to working directory
+ - name: Build autocompletion
shell: bash
run: |
- mkdir completion
- cp -r ./target/${{ matrix.triple.target }}/release/build/bottom-*/out/. completion
+ cargo run --manifest-path ./xtask/Cargo.toml -- completion completion
+
+ - name: Build manpage
+ shell: bash
+ run: |
+ cargo run --manifest-path ./xtask/Cargo.toml -- manpage manpage
- name: Bundle release and completion (Windows)
if: matrix.triple.os == 'windows-2019'
@@ -188,6 +188,13 @@ jobs:
tar -C ./completion -czvf completion.tar.gz .
mv completion.tar.gz release/
+ - name: Compress manpage files (Linux x86-64 GNU)
+ if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
+ shell: bash
+ run: |
+ tar -C ./manpage -czvf manpage.tar.gz .
+ mv manpage.tar.gz release/
+
- name: Save release as artifact
uses: actions/upload-artifact@v2
with:
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 7899db26..2db1942f 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -144,11 +144,15 @@ jobs:
args: --release --verbose --target=${{ matrix.triple.target }} --features "battery"
use-cross: ${{ matrix.triple.cross }}
- - name: Move autocomplete to working directory
+ - name: Build autocompletion
shell: bash
run: |
- mkdir completion
- cp -r ./target/${{ matrix.triple.target }}/release/build/bottom-*/out/. completion
+ cargo run --manifest-path ./xtask/Cargo.toml -- completion completion
+
+ - name: Build manpage
+ shell: bash
+ run: |
+ cargo run --manifest-path ./xtask/Cargo.toml -- manpage manpage
- name: Bundle release and completion (Windows)
if: matrix.triple.os == 'windows-2019'
@@ -180,6 +184,13 @@ jobs:
tar -C ./completion -czvf completion.tar.gz .
mv completion.tar.gz release/
+ - name: Compress manpage files (Linux x86-64 GNU)
+ if: matrix.triple.target == 'x86_64-unknown-linux-gnu' && matrix.triple.container == ''
+ shell: bash
+ run: |
+ tar -C ./manpage -czvf manpage.tar.gz .
+ mv manpage.tar.gz release/
+
- name: Save release files as artifacts
uses: actions/upload-artifact@v2
with: