1
0
mirror of https://github.com/containers/youki synced 2024-11-22 17:02:00 +01:00

Fix release script and prepare for release

This commit is contained in:
Yashodhan Joshi 2022-12-06 11:26:00 +05:30
parent 3a6d10510c
commit 053b76a876
12 changed files with 43 additions and 49 deletions

@ -38,7 +38,7 @@ jobs:
toolchain: stable
override: true
- name: Release build
run: make release-build
run: make youki-release
- name: Create output directory
run: mkdir output
- name: Copy files to output
@ -47,7 +47,7 @@ jobs:
cp README.md output/README.md
cp LICENSE output/LICENSE
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: output
path: output/*
@ -72,43 +72,31 @@ jobs:
MINOR=${VERSION%.*}
MINOR=${MINOR#*.}
PATCH=${VERSION##*.}
echo "::set-output name=version::${VERSION}"
echo "::set-output name=outputdir::youki_${MAJOR}_${MINOR}_${PATCH}_linux"
echo "::set-output name=innerdir::youki-${VERSION}"
- name: Create Release Draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.info.outputs.version }} Release
draft: true
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "OUTPUTDIR=youki_${MAJOR}_${MINOR}_${PATCH}_linux" >> $GITHUB_ENV
echo "INNERDIR=youki-${VERSION}" >> $GITHUB_ENV
- name: Create Output Directory
run: mkdir -p ${{ steps.info.outputs.outputdir }}/${{ steps.info.outputs.innerdir }}
run: mkdir -p ${{ env.OUTPUTDIR }}/${{ env.INNERDIR }}
- name: Download Linux Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: output
path: ${{ steps.info.outputs.outputdir }}/${{ steps.info.outputs.innerdir }}
path: ${{ env.OUTPUTDIR }}/${{ env.INNERDIR }}
- name: Restore File Modes
run: |
chmod 755 ${{ steps.info.outputs.outputdir }}/${{ steps.info.outputs.innerdir }}/youki
chmod 755 ${{ env.OUTPUTDIR }}/${{ env.INNERDIR }}/youki
- name: Create tarball
run: tar -zcvf ${{ steps.info.outputs.outputdir }}.tar.gz ${{ steps.info.outputs.outputdir }}
- name: Upload Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tar -zcvf ${{ env.OUTPUTDIR }}.tar.gz ${{ env.OUTPUTDIR }}
- name: Create Release Draft
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ steps.info.outputs.outputdir }}.tar.gz
asset_name: ${{ steps.info.outputs.outputdir }}.tar.gz
asset_content_type: application/gzip
name: ${{ steps.info.outputs.version }} Release
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
files: ./${{ env.OUTPUTDIR }}.tar.gz
publish:
name: Publish Packages
@ -129,3 +117,5 @@ jobs:
run: cargo publish -p libcontainer --no-verify
- name: Publish liboci-cli
run: cargo publish -p liboci-cli --no-verify
- name: Publish youki
run: cargo publish -p youki --no-verify

8
Cargo.lock generated

@ -1207,7 +1207,7 @@ checksum = "c0f80d65747a3e43d1596c7c5492d95d5edddaabd45a7fcdb02b95f644164966"
[[package]]
name = "libcgroups"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"anyhow",
"clap",
@ -1231,7 +1231,7 @@ dependencies = [
[[package]]
name = "libcontainer"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"anyhow",
"bitflags",
@ -1295,7 +1295,7 @@ dependencies = [
[[package]]
name = "liboci-cli"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"clap",
]
@ -3274,7 +3274,7 @@ dependencies = [
[[package]]
name = "youki"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"anyhow",
"chrono",

@ -22,7 +22,7 @@ all: youki-release rust-oci-tests-bin runtimetest
# Tests
unittest:
cd ./crates && cargo test --all-targets --all-features
LD_LIBRARY_PATH=$HOME/.wasmedge/lib cd ./crates && cargo test --all --all-targets --all-features
featuretest:
./scripts/features_test.sh

@ -151,7 +151,8 @@ $ sudo apt-get install \
libdbus-glib-1-dev \
build-essential \
libelf-dev \
libseccomp-dev
libseccomp-dev \
libclang-dev
```
### Fedora, Centos, RHEL and related distributions
@ -162,7 +163,8 @@ $ sudo dnf install \
systemd-devel \
dbus-devel \
elfutils-libelf-devel \
libseccomp-devel
libseccomp-devel \
libclang-dev
```
## Build

@ -1,6 +1,6 @@
[package]
name = "libcgroups"
version = "0.0.3"
version = "0.0.4"
description = "Library for cgroup"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"

@ -1,6 +1,6 @@
[package]
name = "libcontainer"
version = "0.0.3"
version = "0.0.4"
description = "Library for container control"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"
@ -36,7 +36,7 @@ oci-spec = { version = "0.5.8", features = ["runtime"] }
path-clean = "0.1.0"
procfs = "0.14.1"
prctl = "1.0.0"
libcgroups = { version = "0.0.3", path = "../libcgroups", default-features = false }
libcgroups = { version = "0.0.4", path = "../libcgroups", default-features = false }
libseccomp = { version = "0.3.0" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@ -44,7 +44,7 @@ syscalls = "0.6.7"
rust-criu = "0.2.0"
wasmer = { version = "2.2.0", optional = true }
wasmer-wasi = { version = "2.3.0", optional = true }
wasmedge-sdk = { version = "0.7.1", optional = true }
wasmedge-sdk = { version = "0.7.1", optional = true}
[dev-dependencies]
oci-spec = { version = "0.5.8", features = ["proptests", "runtime"] }

@ -1,6 +1,6 @@
[package]
name = "liboci-cli"
version = "0.0.3"
version = "0.0.4"
description = "Parse command line arguments for OCI container runtimes"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"

@ -1,6 +1,6 @@
[package]
name = "youki"
version = "0.0.3"
version = "0.0.4"
description = "A container runtime written in Rust"
license-file = "../../LICENSE"
repository = "https://github.com/containers/youki"
@ -25,9 +25,9 @@ features = ["std", "suggestions", "derive", "cargo"]
[dependencies]
anyhow = "1.0.65"
chrono = { version = "0.4", features = ["serde"] }
libcgroups = { version = "0.0.3", path = "../libcgroups", default-features = false }
libcontainer = { version = "0.0.3", path = "../libcontainer", default-features = false }
liboci-cli = { version = "0.0.3", path = "../liboci-cli" }
libcgroups = { version = "0.0.4", path = "../libcgroups", default-features = false }
libcontainer = { version = "0.0.4", path = "../libcontainer", default-features = false }
liboci-cli = { version = "0.0.4", path = "../liboci-cli" }
log = { version = "0.4", features = ["std"] }
nix = "0.25.0"
oci-spec = { version = "0.5.8", features = ["runtime"] }

@ -23,7 +23,8 @@ $ sudo apt-get install \
libdbus-glib-1-dev \
build-essential \
libelf-dev \
libseccomp-dev
libseccomp-dev \
libclang-dev
```
#### Fedora, Centos, RHEL and related distributions
@ -34,7 +35,8 @@ $ sudo dnf install \
systemd-devel \
dbus-devel \
elfutils-libelf-devel \
libseccomp-devel
libseccomp-devel \
libclang-dev
```
---

@ -2,13 +2,13 @@ mod tests;
mod utils;
use crate::tests::hooks::get_hooks_tests;
use crate::tests::hostname::get_hostname_test;
use crate::tests::lifecycle::{ContainerCreate, ContainerLifecycle};
use crate::tests::linux_ns_itype::get_ns_itype_tests;
use crate::tests::pidfile::get_pidfile_test;
use crate::tests::readonly_paths::get_ro_paths_test;
use crate::tests::seccomp_notify::get_seccomp_notify_test;
use crate::tests::tlb::get_tlb_test;
use crate::tests::hostname::get_hostname_test;
use crate::utils::support::{set_runtime_path, set_runtimetest_path};
use anyhow::{Context, Result};
use clap::Parser;

@ -1,9 +1,9 @@
pub mod cgroups;
pub mod hooks;
pub mod hostname;
pub mod lifecycle;
pub mod linux_ns_itype;
pub mod pidfile;
pub mod readonly_paths;
pub mod seccomp_notify;
pub mod tlb;
pub mod hostname;

@ -68,7 +68,7 @@ pub fn validate_hostname(spec: &Spec) {
}
let actual_hostname = nix::unistd::gethostname().expect("failed to get current hostname");
let actual_hostname = actual_hostname.to_str().unwrap();
if &actual_hostname != expected_hostname {
if actual_hostname != expected_hostname {
eprintln!(
"Unexpected hostname, expected: {:?} found: {:?}",
expected_hostname, actual_hostname