forked from The-OpenROAD-Project/OpenROAD
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.16 KB
/
github-actions-build-deb-package.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
name: Build deb packages
on:
workflow_dispatch:
push:
pull_request:
jobs:
builder:
name: 'Build .deb package'
strategy:
fail-fast: false
matrix:
os: ['debian10', 'debian11', 'ubuntu20.04', 'ubuntu22.04']
runs-on: ubuntu-latest
container:
image: openroad/${{ matrix.os }}-dev
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build package
run: |
mkdir artifacts
debuild --preserve-env --preserve-envvar=PATH -B
mv ../openroad_* artifacts
- name: Rename artifact
id: artifact
run: |
cd artifacts
file=$(realpath openroad_*.deb)
artifact=$(echo $file | sed 's/\.\([^.]*\)$/-${{ matrix.os }}.\1/')
mv $file $artifact
echo "file=$(realpath $artifact)" >> $GITHUB_OUTPUT
name=$(basename $artifact)
name=${name%.deb}
echo "name=$name" >> $GITHUB_OUTPUT
- name: Upload workflow artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact.outputs.name }}
path: ${{ steps.artifact.outputs.file }}