mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-20 08:27:49 +02:00
- Assumes that the target system has ca-certificates installed already.
- Vendor OpenSSL to support Ubuntu 16.04 which only has OpenSSL 1.0.0.
- Use an Ubuntu 16.04 compatible version of libgcc1 (don't use cargo-deb $auto
depends as the GH 16.04 runner has a much newer libgcc1 package than stock
Ubuntu 16.04).
- Use GH caching to avoid repeat compilation of unchanging cargo deb and krill
dependencies.
- Sanity check the created DEB in targeted O/S versions.
93 lines
2.1 KiB
YAML
93 lines
2.1 KiB
YAML
name: Packaging
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '.dockerignore'
|
|
- '.github/workflow/pkg.yml'
|
|
- 'Changelog.md'
|
|
- 'Dockerfile'
|
|
- 'doc/**'
|
|
- 'docker/**'
|
|
- 'LICENSE'
|
|
- 'README.md'
|
|
- 'tests/e2e/**'
|
|
# Hmm, annoying, do we really have to duplicate this?
|
|
pull_request:
|
|
paths-ignore:
|
|
- '.dockerignore'
|
|
- '.github/workflow/pkg.yml'
|
|
- 'Changelog.md'
|
|
- 'Dockerfile'
|
|
- 'doc/**'
|
|
- 'docker/**'
|
|
- 'LICENSE'
|
|
- 'README.md'
|
|
- 'tests/e2e/**'
|
|
|
|
jobs:
|
|
deb-pkg:
|
|
env:
|
|
CARGO_DEB_VER: 1.23.1
|
|
name: deb-pkg
|
|
runs-on: [ubuntu-16.04]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Rust
|
|
uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: stable
|
|
|
|
- name: Cache Dot Cargo
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Cache Cargo Deb binary
|
|
id: cache-cargo-deb
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cargo/bin/cargo-deb
|
|
key: ${{ runner.os }}-${{ env.CARGO_DEB_VER }}-cargo-deb
|
|
|
|
- name: Install Cargo Deb
|
|
if: steps.cache-cargo-deb.outputs.cache-hit != 'true'
|
|
run: |
|
|
cargo install cargo-deb --version=$CARGO_DEB_VER
|
|
|
|
- name: Create the package
|
|
run: |
|
|
cargo deb --verbose
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: debian-package
|
|
path: target/debian/*.deb
|
|
|
|
deb-pkg-test:
|
|
name: test
|
|
needs: deb-pkg
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
|
|
steps:
|
|
- name: Download DEB package
|
|
uses: actions/download-artifact@v2
|
|
|
|
- name: Install DEB package
|
|
run: |
|
|
sudo apt-get -y install ./debian-package/*.deb
|
|
shell: bash
|
|
|
|
- name: Test installed binaries
|
|
run: |
|
|
krillc --version
|
|
krill --version
|
|
shell: bash |