Create a Krill DEB package via GH actions:

- 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.
This commit is contained in:
Ximon Eighteen
2020-06-23 12:28:17 +02:00
parent d0609a04c6
commit 7031576f63
5 changed files with 127 additions and 2 deletions
+5 -1
View File
@@ -4,6 +4,8 @@ on:
paths-ignore:
- '.dockerignore'
- '.github/workflow/e2e.yml'
- '.github/workflow/pkg.yml'
- '.github/workflow/e2e test cache rebuild.yml'
- 'Changelog.md'
- 'Dockerfile'
- 'doc/**'
@@ -16,6 +18,8 @@ on:
paths-ignore:
- '.dockerignore'
- '.github/workflow/e2e.yml'
- '.github/workflow/pkg.yml'
- '.github/workflow/e2e test cache rebuild.yml'
- 'Changelog.md'
- 'Dockerfile'
- 'doc/**'
@@ -39,4 +43,4 @@ jobs:
with:
rust-version: ${{ matrix.rust }}
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo test --verbose
+2
View File
@@ -24,6 +24,8 @@ on:
paths:
- '**'
- '!.github/workflows/ci.yml'
- '!.github/workflows/e2e test cache rebuild.yml'
- '!.github/workflows/pkg.yml'
- '!Changelog.md'
- '!doc/**'
- '!LICENSE'
+93
View File
@@ -0,0 +1,93 @@
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