-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 2.91 KB
/
ci_ubuntu_verify_installation.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
name: CI ubuntu verify installation
'on':
workflow_call: null
jobs:
fetch_installations:
runs-on: ${{ matrix.os }}
outputs:
cm_versions: ${{ steps.extract-versions.outputs.cm_versions }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Provide the repo locally via http
run: nohup python3 -m http.server 8080 &
working-directory: ./ubuntu/
- name: Install maintainer publickey
run: curl -s --compressed http://localhost:8080/wibu-packages-maintainers.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg
- name: Add local repo to APT sources
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.list
- name: update apt
run: sudo apt-get update
- name: Get available versions of c-lite
id: get_versions
run: |
apt-cache madison codemeter-lite | grep "http://localhost:8080" | awk '{print $3}' > versions.txt
cat versions.txt
- name: Kill the webserver again
run: sudo pkill python3
- name: Extract lines from versions.txt
id: extract-versions
run: |
versions=$(cat versions.txt | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "cm_versions=$versions" >> $GITHUB_OUTPUT
package_is_installable:
runs-on: ${{ matrix.os }}
needs: fetch_installations
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
version: ${{ fromJson(needs.fetch_installations.outputs.cm_versions) }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Provide the repo locally via http
run: nohup python3 -m http.server 8080 &
working-directory: ./ubuntu/
- name: Install maintainer publickey
run: curl -s --compressed http://localhost:8080/wibu-packages-maintainers.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg
- name: Add local repo to APT sources
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/wibu-packages-maintainers.gpg] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.list
- name: Update apt
run: sudo apt-get update
- name: Install codemeter-lite in version ${{ matrix.version }}
run: sudo apt-get install -y codemeter-lite=${{ matrix.version }}
- name: Kill the webserver again
run: sudo pkill python3
- name: Codemeter is running
run: systemctl status codemeter
- name: Codemeter version output is expected
run: cmu --version | grep -q '${{ matrix.version }}'
- name: Verify codemeter service is running as daemon user
run: systemctl show -pUser codemeter.service | grep -qx User=daemon