Skip to content

Commit

Permalink
docs(main): support arm64 release docs
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu committed Nov 20, 2023
1 parent 0b519e5 commit 695358d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 12 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,24 @@ jobs:
uses: actions-rust-lang/[email protected]
env:
RUST_CACHE_KEY_OS: rust-cache-${{ matrix.arch }}
- name: Determine Release Info
id: info
env:
GITHUB_REF: ${{ github.ref }}
run: |
VERSION=${GITHUB_REF##*v}
MAJOR=${VERSION%%.*}
MINOR=${VERSION%.*}
MINOR=${MINOR#*.}
PATCH=${VERSION##*.}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "OUTPUTDIR=youki_${MAJOR}_${MINOR}_${PATCH}_linux" >> $GITHUB_ENV
echo "INNERDIR=youki-${VERSION}" >> $GITHUB_ENV
- name: Install just
uses: taiki-e/install-action@just
- name: Version update
run: |
sudo env PATH=$PATH just version-up ${{ env.VERSION }}
- name: Install requirements
if: ${{ matrix.arch == 'x86_64' }}
run: |
Expand Down Expand Up @@ -101,6 +117,7 @@ jobs:
files: |
./${{ env.OUTPUTDIR }}-x86_64.tar.gz
./${{ env.OUTPUTDIR }}-aarch64.tar.gz
publish:
name: Publish Packages
needs: build
Expand Down
2 changes: 1 addition & 1 deletion crates/libcontainer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ oci-spec = { version = "~0.6.4", features = ["runtime"] }
once_cell = "1.18.0"
procfs = "0.16.0"
prctl = "1.0.0"
libcgroups = { version = "0.3.0", path = "../libcgroups", default-features = false }
libcgroups = { path = "../libcgroups", default-features = false, version = "0.3.0" } # MARK: Version
libseccomp = { version = "0.3.0", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
14 changes: 7 additions & 7 deletions crates/youki/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ features = ["std", "suggestions", "derive", "cargo", "help", "usage", "error-con
[dependencies]
anyhow = "1.0.75"
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
libcgroups = { version = "0.3.0", path = "../libcgroups", default-features = false }
libcontainer = { version = "0.3.0", path = "../libcontainer", default-features = false }
liboci-cli = { version = "0.3.0", path = "../liboci-cli" }
libcgroups = { path = "../libcgroups", default-features = false, version = "0.3.0" } # MARK: Version
libcontainer = { path = "../libcontainer", default-features = false, version = "0.3.0" } # MARK: Version
liboci-cli = { path = "../liboci-cli", version = "0.3.0" } # MARK: Version
nix = "0.27.1"
once_cell = "1.18.0"
pentacle = "1.0.0"
Expand All @@ -44,9 +44,9 @@ caps = "0.5.5"
wasmer = { version = "4.0.0", optional = true }
wasmer-wasix = { version = "0.9.0", optional = true }
wasmedge-sdk = { version = "0.13.2", optional = true }
wasmtime = {version = "10.0.2", optional = true }
wasmtime-wasi = {version = "10.0.2", optional = true }
tracing = { version = "0.1.40", features = ["attributes"]}
wasmtime = { version = "10.0.2", optional = true }
wasmtime-wasi = { version = "10.0.2", optional = true }
tracing = { version = "0.1.40", features = ["attributes"] }
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
tracing-journald = "0.3.0"

Expand All @@ -57,4 +57,4 @@ scopeguard = "1.2.0"

[build-dependencies]
anyhow = "1.0.75"
vergen = {version ="8.2.6", features =["git","gitcl"]}
vergen = { version = "8.2.6", features = ["git", "gitcl"] }
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,6 @@ ci-musl-prepare: ci-prepare
exit 1

version-up version:
git grep -l "^version = .* # MARK: Version" | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" # MARK: Version/version = "{{version}}" # MARK: Version/g'
git grep -l "} # MARK: Version" | grep -v justfile | xargs sed -i 's/version = "[0-9]\.[0-9]\.[0-9]" } # MARK: Version/version = "{{version}}" } # MARK: Version/g'
{{ cwd }}/scripts/release_tag.sh {{version}}
13 changes: 9 additions & 4 deletions scripts/release_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ if [ -z "$TAG" ]; then
echo "Error: No version number provided."
exit 1
fi
VERSION=${TAG##*v}
MAJOR=${VERSION%%.*}
MINOR=${VERSION%.*}
MINOR=${MINOR#*.}
PATCH=${VERSION##*.}

START_MARKER="<!--youki release begin-->"
END_MARKER="<!--youki release end-->"


echo "\`\`\`console
\$ wget -qO youki_${TAG}_linux.tar.gz https://github.com/containers/youki/releases/download/v${TAG}/youki_${TAG}_linux-\$(uname -m).tar.gz
\$ tar -zxvf youki_${TAG}_linux.tar.gz --strip-components=1
\$ wget -qO youki_${VERSION}_linux.tar.gz https://github.com/containers/youki/releases/download/v${VERSION}/youki_${MAJOR}_${MINOR}_${PATCH}_linux-\$(uname -m).tar.gz
\$ tar -zxvf youki_${VERSION}_linux.tar.gz --strip-components=1
# Maybe you need root privileges.
\$ mv youki-${TAG}/youki /usr/local/bin/youki
\$ rm -rf youki_${TAG}_linux.tar.gz youki-${TAG}
\$ mv youki-${VERSION}/youki /usr/local/bin/youki
\$ rm -rf youki_${VERSION}_linux.tar.gz youki-${VERSION}
\`\`\`" > replace_content.txt

awk -v start="$START_MARKER" -v end="$END_MARKER" -v newfile="replace_content.txt" '
Expand Down

0 comments on commit 695358d

Please sign in to comment.