diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8b932961..70f950e29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: with: submodules: recursive - run: sudo apt-get -y update - - run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev + - run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libclang-dev - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -22,7 +22,7 @@ jobs: - name: Build run: make youki-release - name: test - run: make test-all + run: make unittest featuretest oci-tests upload: name: Upload @@ -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,18 +47,16 @@ 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/* release: - name: Publish Release + name: Create Draft Release runs-on: ubuntu-20.04 needs: - upload - outputs: - version: ${{ steps.info.outputs.version }} steps: - uses: actions/checkout@v3 @@ -72,43 +70,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: ${{ env.VERSION }} Release + draft: true + token: ${{ secrets.GITHUB_TOKEN }} + files: ./${{ env.OUTPUTDIR }}.tar.gz publish: name: Publish Packages @@ -129,3 +115,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 diff --git a/Cargo.lock b/Cargo.lock index c904e0394..0df8f27e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", ] @@ -3273,7 +3273,7 @@ dependencies = [ [[package]] name = "youki" -version = "0.0.3" +version = "0.0.4" dependencies = [ "anyhow", "caps", diff --git a/Makefile b/Makefile index 8b9af4104..92668f2bd 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ all: youki-release rust-oci-tests-bin runtimetest # Tests unittest: - cd ./crates && cargo test --all-targets --all-features + cd ./crates && LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --all --all-targets --all-features featuretest: ./scripts/features_test.sh diff --git a/README.md b/README.md index a41be9d3e..5a15faefa 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/crates/libcgroups/Cargo.toml b/crates/libcgroups/Cargo.toml index 6cbf284ad..3780e6a52 100644 --- a/crates/libcgroups/Cargo.toml +++ b/crates/libcgroups/Cargo.toml @@ -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" diff --git a/crates/libcontainer/Cargo.toml b/crates/libcontainer/Cargo.toml index e44bcf493..53b6873b4 100644 --- a/crates/libcontainer/Cargo.toml +++ b/crates/libcontainer/Cargo.toml @@ -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"] } diff --git a/crates/liboci-cli/Cargo.toml b/crates/liboci-cli/Cargo.toml index e7a0117cb..1aef2d208 100644 --- a/crates/liboci-cli/Cargo.toml +++ b/crates/liboci-cli/Cargo.toml @@ -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" diff --git a/crates/youki/Cargo.toml b/crates/youki/Cargo.toml index d9e8a0676..86bcd8233 100644 --- a/crates/youki/Cargo.toml +++ b/crates/youki/Cargo.toml @@ -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"] } diff --git a/docs/src/user/basic_setup.md b/docs/src/user/basic_setup.md index 3e007a7d2..2ac41a84e 100644 --- a/docs/src/user/basic_setup.md +++ b/docs/src/user/basic_setup.md @@ -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 ``` --- diff --git a/tests/rust-integration-tests/runtimetest/src/tests.rs b/tests/rust-integration-tests/runtimetest/src/tests.rs index 8e1ec9026..4f19e7e37 100644 --- a/tests/rust-integration-tests/runtimetest/src/tests.rs +++ b/tests/rust-integration-tests/runtimetest/src/tests.rs @@ -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