forked from vbwagner/catdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.49 KB
/
c-cpp.yml
File metadata and controls
58 lines (50 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: C/C++ CI
# Per https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
pull_request:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Update generated configuration files
run: autoreconf -fiv
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: test-logs
path: |
tests/test-suite.log
tests/*.log
catdoc-*/_build/sub/tests/test-suite.log
catdoc-*/_build/sub/tests/*.log
- name: Upload distribution .tar.gz as artifact
uses: actions/upload-artifact@v5
with:
name: dist-archive
path: catdoc-*.tar.gz
- name: Upload distribution tarball to release
if: github.event_name == 'release'
run: |
version=$(echo catdoc-*.tar.gz | sed 's/catdoc-//;s/\.tar\.gz//')
# Rename the file, otherwise it has the same filename as the source code tarball.
cp catdoc-*.tar.gz catdoc-${version}-dist.tar.gz
gh release upload ${{ github.event.release.tag_name }} catdoc-${version}-dist.tar.gz
env:
GH_TOKEN: ${{ github.token }}