mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 03:07:18 +02:00
feat: Build taskwarrior CI against stable
This commit is contained in:
parent
39ec1387e5
commit
56f9697223
3 changed files with 53 additions and 18 deletions
45
.github/actions/install-taskwarrior/action.yml
vendored
Normal file
45
.github/actions/install-taskwarrior/action.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: 'Install Taskwarrior'
|
||||||
|
description: 'Builds taskwarrior from the latest stable release and installs it'
|
||||||
|
inputs:
|
||||||
|
secret_gh_token:
|
||||||
|
description: "GH token for downloading the assets"
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
# This pattern should only match match assets with a [numbers and dots] suffix
|
||||||
|
- name: Download latest stable taskwarrior release
|
||||||
|
run: |
|
||||||
|
gh release download -p "task-[0-9.]*.tar.gz" -R "GothenburgBitFactory/taskwarrior" -D /tmp/download
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ inputs.secret_gh_token }}
|
||||||
|
# Future proofing
|
||||||
|
- name: Check that we only got one release asset
|
||||||
|
run: |
|
||||||
|
if [ $(ls -1 /tmp/download | wc -l) -ne 1 ]
|
||||||
|
then
|
||||||
|
echo "Expected exactly one release asset"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Got expected number of release assets"
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Extract taskwarrior without version number
|
||||||
|
run: |
|
||||||
|
cd /tmp/download
|
||||||
|
find . -name "*.tar.gz" -exec mv {} task.tar.gz \;
|
||||||
|
tar -xf task.tar.gz --transform='s;^task-[0-9.]*/;task/;'
|
||||||
|
cd /tmp
|
||||||
|
mv download/task taskwarrior
|
||||||
|
rm -rf download
|
||||||
|
shell: bash
|
||||||
|
- name: Compile taskwarrior
|
||||||
|
run: |
|
||||||
|
cd /tmp/taskwarrior
|
||||||
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release .
|
||||||
|
cmake --build build
|
||||||
|
sudo cmake --install build
|
||||||
|
cd ..
|
||||||
|
rm -rf taskwarrior/
|
||||||
|
shell: bash
|
13
.github/workflows/cd.yml
vendored
13
.github/workflows/cd.yml
vendored
|
@ -204,15 +204,10 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
- run: sudo apt-get update
|
- run: sudo apt-get update
|
||||||
- name: Compile taskwarrior
|
- name: 'Install Taskwarrior'
|
||||||
run: |
|
uses: ./.github/actions/install-taskwarrior
|
||||||
cd /tmp
|
with:
|
||||||
git clone https://github.com/GothenburgBitFactory/taskwarrior
|
secret_gh_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
cd taskwarrior
|
|
||||||
git checkout v3.0.0
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=release -DENABLE_SYNC=OFF .
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
- run: |
|
- run: |
|
||||||
task --version
|
task --version
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -32,15 +32,10 @@ jobs:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
- run: sudo apt-get update
|
- run: sudo apt-get update
|
||||||
- name: Compile taskwarrior
|
- name: 'Install Taskwarrior'
|
||||||
run: |
|
uses: ./.github/actions/install-taskwarrior
|
||||||
cd /tmp
|
with:
|
||||||
git clone https://github.com/GothenburgBitFactory/taskwarrior
|
secret_gh_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
cd taskwarrior
|
|
||||||
git checkout v3.0.0
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=release -DENABLE_SYNC=OFF .
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
- run: |
|
- run: |
|
||||||
task --version
|
task --version
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue