forked from NVIDIA/OpenShell
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (82 loc) · 2.75 KB
/
deb-package.yml
File metadata and controls
92 lines (82 loc) · 2.75 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
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
name: Debian Package
on:
workflow_call:
inputs:
deb-version:
required: true
type: string
checkout-ref:
required: true
type: string
permissions:
contents: read
packages: read
defaults:
run:
shell: bash
jobs:
build-deb-linux:
name: Build Debian Package (Linux ${{ matrix.arch }})
strategy:
matrix:
include:
- arch: amd64
runner: build-amd64
deb_arch: amd64
cli_target: x86_64-unknown-linux-musl
gnu_target: x86_64-unknown-linux-gnu
- arch: arm64
runner: build-arm64
deb_arch: arm64
cli_target: aarch64-unknown-linux-musl
gnu_target: aarch64-unknown-linux-gnu
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
container:
image: ghcr.io/nvidia/openshell/ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs['checkout-ref'] }}
- name: Download CLI artifact
uses: actions/download-artifact@v4
with:
name: cli-linux-${{ matrix.arch }}
path: package-input/
- name: Download gateway artifact
uses: actions/download-artifact@v4
with:
name: gateway-binary-linux-${{ matrix.arch }}
path: package-input/
- name: Download VM driver artifact
uses: actions/download-artifact@v4
with:
name: driver-vm-linux-${{ matrix.arch }}
path: package-input/
- name: Extract package inputs
run: |
set -euo pipefail
mkdir -p package-binaries
tar -xzf "package-input/openshell-${{ matrix.cli_target }}.tar.gz" -C package-binaries
tar -xzf "package-input/openshell-gateway-${{ matrix.gnu_target }}.tar.gz" -C package-binaries
tar -xzf "package-input/openshell-driver-vm-${{ matrix.gnu_target }}.tar.gz" -C package-binaries
ls -lah package-binaries
- name: Build Debian package
run: |
set -euo pipefail
OPENSHELL_CLI_BINARY="${PWD}/package-binaries/openshell" \
OPENSHELL_GATEWAY_BINARY="${PWD}/package-binaries/openshell-gateway" \
OPENSHELL_DRIVER_VM_BINARY="${PWD}/package-binaries/openshell-driver-vm" \
OPENSHELL_DEB_VERSION="${{ inputs['deb-version'] }}" \
OPENSHELL_DEB_ARCH="${{ matrix.deb_arch }}" \
OPENSHELL_OUTPUT_DIR=artifacts \
tasks/scripts/package-deb.sh
- name: Upload Debian package artifact
uses: actions/upload-artifact@v4
with:
name: deb-linux-${{ matrix.arch }}
path: artifacts/*.deb
retention-days: 5