Skip to content

Commit 01e5bea

Browse files
committed
Update Github Actions
* Rerun workflows on the 15th of every month * Upload build directory if workflow fails
1 parent 3fed81d commit 01e5bea

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

.github/workflows/macos-build.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
name: MacOS build
99

10-
on: [push]
10+
on:
11+
push:
12+
schedule:
13+
- cron: '0 0 15 * *'
1114

1215
jobs:
1316
build-macos-debug:
@@ -30,6 +33,9 @@ jobs:
3033
uses: actions/checkout@v4
3134
- run: git describe --always --dirty
3235

36+
- name: Get version from git tag
37+
run: echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV
38+
3339
- name: Configure CMake
3440
run: cmake -B build -DCMAKE_OSX_ARCHITECTURES="${{ matrix.osx_arch }}" -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}"
3541

@@ -38,3 +44,11 @@ jobs:
3844

3945
- name: Test
4046
run: cmake --build build --target test
47+
48+
- name: Upload build directory if failed
49+
if: ${{ failure() }}
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: libargp-${{ env.GIT_DESCRIBE }}-macos-build
53+
path: ./
54+
if-no-files-found: error

.github/workflows/ubuntu-build.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
name: Ubuntu build
99

10-
on: [push]
10+
on:
11+
push:
12+
schedule:
13+
- cron: '0 0 15 * *'
1114

1215
jobs:
1316
build-ubuntu:

.github/workflows/windows-build.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
##############################################################################
2-
# Copyright 2022, 2024 Leon Lynch
2+
# Copyright 2022, 2024-2025 Leon Lynch
33
#
44
# This file is licensed under the terms of the LGPL v2.1 license.
55
# See LICENSE file.
66
##############################################################################
77

88
name: Windows build
99

10-
on: [push]
10+
on:
11+
push:
12+
schedule:
13+
- cron: '0 0 15 * *'
1114

1215
jobs:
1316
build-windows-msys2-debug:
@@ -52,7 +55,7 @@ jobs:
5255
- name: Configure Git
5356
run: |
5457
git config --global core.autocrlf true
55-
git describe --always --dirty
58+
echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV
5659
5760
- name: Configure CMake
5861
run: cmake -G Ninja -B build -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}"
@@ -62,3 +65,11 @@ jobs:
6265

6366
- name: Test
6467
run: cmake --build build --target test
68+
69+
- name: Upload build directory if failed
70+
if: ${{ failure() }}
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: libargp-${{ env.GIT_DESCRIBE }}-windows-build
74+
path: ./
75+
if-no-files-found: error

0 commit comments

Comments
 (0)