-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (111 loc) · 3.49 KB
/
linux-upstream-gh-xz.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Linux + upstream GitHub xz
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: '02 02 * * 6' # Run every Saturday
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
perl:
- '5.38'
lzma-version:
- v5.4.4
- v5.4.3
- v5.4.2
- v5.4.1
- v5.4.0
- v5.2.12
- v5.2.11
- v5.2.10
# - v5.0.7
- master
env:
lzma-source: ${{ github.workspace }}/upstream-lzma-source
lzma-install: ${{ github.workspace }}/upstream-lzma-install
LIBLZMA_LIB: ${{ github.workspace }}/upstream-lzma-install/lib
LIBLZMA_INCLUDE: ${{ github.workspace }}/upstream-lzma-install/include
LZMA_VERSION: ${{ matrix.lzma-version }}
defaults:
run:
working-directory: repo
name: Perl ${{ matrix.perl }} with lzma ${{matrix.lzma-version}}
steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Cancel if Scheduled Job and not running the 'master' branch
if: github.event_name == 'schedule' && matrix.lzma-version != 'master'
run: |
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make Paths
run: |
mkdir -p ${{ env.lzma-source }}
mkdir -p ${{ env.lzma-install }}
mkdir -p ${{ github.workspace }}/repo
- name: Cache lzma ${{matrix.lzma-version}}
id: cache-lzma
uses: actions/cache@v3
with:
# NOTE: path doesn't expand variables!
path: upstream-lzma-install
key: ${{ runner.os }}-lzma-${{ matrix.lzma-version }}
- name: Checkout upstream lzma ${{matrix.lzma-version}}
if: steps.cache-lzma.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: tukaani-project/xz
ref: ${{ matrix.lzma-version }}
path: ${{ env.lzma-source }}
# # Install Autotools on Linux
# - name: Install autogen Dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen
# Configure-based build
# - name: Build lzma ${{matrix.lzma-version}}
# run: |
# # Run autogen.sh script if not already run
# if [ ! -f configure ]
# then
# ./autogen.sh
# fi
# ./configure --prefix ${{ env.lzma-install }}
# make
# make check
# make install
# working-directory: ${{ env.lzma-source }}
# CMake-based build
- name: Build lzma ${{matrix.lzma-version}}
if: steps.cache-lzma.outputs.cache-hit != 'true'
run: |
mkdir ${HOME}/build-xz
cd ${HOME}/build-xz
cmake ${{ env.lzma-source }}/CMakeLists.txt -B . --install-prefix ${{ env.lzma-install }} -DBUILD_SHARED_LIBS=ON
cmake --build .
cmake --install .
- name: Show installed lzma files
run: |
find .
working-directory: ${{ env.lzma-install }}
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: Perl version
run: perl -V
- name: Install dependencies
# pod::markdown now available in 5.6
if: matrix.perl != '5.6'
run: cpanm --quiet --installdeps --notest .
- name: Build
run: |
perl Makefile.PL && make
- name: Test
run: make test