mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 20:17:46 +08:00
Fix fetch-changed prefix, use rustinstall.sh for img
This commit is contained in:
parent
a309abb16b
commit
45b03a18aa
@ -29,21 +29,25 @@ fetch-changed:
|
|||||||
image: "redoxos/redox-base-x86_64"
|
image: "redoxos/redox-base-x86_64"
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
|
||||||
|
- curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal
|
||||||
|
- export PATH="$HOME/.cargo/bin:$PATH" PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1
|
||||||
|
- make prefix/x86_64-unknown-redox/gcc-install
|
||||||
|
- ln -s gcc-install prefix/x86_64-unknown-redox/sysroot
|
||||||
- |
|
- |
|
||||||
export PATH="$HOME/.cargo/bin:$PATH" &&
|
(cd prefix/x86_64-unknown-redox/sysroot &&
|
||||||
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
|
sed "s|/usr/share|$(pwd)/share|g" "bin/libtoolize.orig" > "bin/libtoolize")
|
||||||
cargo install cbindgen &&
|
- ./scripts/fetch-changed.sh
|
||||||
env PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 ./scripts/fetch-changed.sh
|
|
||||||
|
|
||||||
img:
|
img:
|
||||||
image: "redoxos/redox-base-x86_64"
|
image: "redoxos/redox-base-x86_64"
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- |
|
- echo 'progress = bar:force:noscroll' > /etc/wgetrc
|
||||||
export PATH="$HOME/.cargo/bin:$PATH" &&
|
- export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
(curl "https://sh.rustup.rs" -sSf | sh -s -- -y --default-toolchain stable --profile minimal ) &&
|
- export PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false
|
||||||
cargo install cbindgen &&
|
- ./podman/rustinstall.sh
|
||||||
PODMAN_BUILD=0 SKIP_CHECK_TOOLS=1 REPO_BINARY=1 FSTOOLS_NO_MOUNT=1 COOKBOOK_VERBOSE=false make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
|
- make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
|
||||||
|
|
||||||
pkg:
|
pkg:
|
||||||
image: "rust:trixie"
|
image: "rust:trixie"
|
||||||
|
|||||||
@ -116,7 +116,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||||
NIX_SHELL_BUILD = "1";
|
SKIP_CHECK_TOOLS = "1";
|
||||||
FSTOOLS_IN_PODMAN = "1";
|
FSTOOLS_IN_PODMAN = "1";
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# Install required configuration
|
# Install required configuration
|
||||||
|
|||||||
@ -5,15 +5,11 @@ ifneq ($(PODMAN_BUILD),1)
|
|||||||
# Don't check for dependencies if you will be using Hosted Redox
|
# Don't check for dependencies if you will be using Hosted Redox
|
||||||
ifneq ($(HOSTED_REDOX),1)
|
ifneq ($(HOSTED_REDOX),1)
|
||||||
|
|
||||||
# don't check for Rust and Cargo if building on a Nix system
|
# don't check for compile tools, used when tools are managed externally, like in nix or CI
|
||||||
ifneq ($(NIX_SHELL_BUILD),1)
|
ifneq ($(SKIP_CHECK_TOOLS),1)
|
||||||
ifeq ($(shell which rustup),)
|
ifeq ($(shell which rustup),)
|
||||||
$(error rustup not found, install from "https://rustup.rs/")
|
$(error rustup not found, install from "https://rustup.rs/")
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
# don't check for compile tools, used internally when installing fstools on host
|
|
||||||
ifneq ($(SKIP_CHECK_TOOLS),1)
|
|
||||||
ifeq ($(shell which cbindgen),)
|
ifeq ($(shell which cbindgen),)
|
||||||
$(error cbindgen not found, install from crates.io or from your package manager)
|
$(error cbindgen not found, install from crates.io or from your package manager)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -58,8 +58,9 @@ cookbook_configure
|
|||||||
# monkey patching to make paths working in target system
|
# monkey patching to make paths working in target system
|
||||||
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
|
if [ "$TARGET" != "$COOKBOOK_HOST_TARGET" ]; then
|
||||||
PYTHON_INIT
|
PYTHON_INIT
|
||||||
sed -i "s/sccache //g" "$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
|
CONF="$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
|
||||||
sed -i "s|${COOKBOOK_SYSROOT}|/usr|g" "$COOKBOOK_STAGE/usr/lib/$COOKBOOK_PYTHON_V/$_PYTHON_SYSCONFIGDATA_NAME.py"
|
sed -i "s/sccache //g" "$CONF"
|
||||||
|
sed -i "s|${COOKBOOK_SYSROOT}|/usr|g" $CONF"
|
||||||
fi
|
fi
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@ -657,7 +657,7 @@ pub(crate) fn fetch_cargo(
|
|||||||
cargopath: Option<&String>,
|
cargopath: Option<&String>,
|
||||||
logger: &PtyOut,
|
logger: &PtyOut,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if !check_toolchain_available() {
|
if !check_cargo_available() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -682,12 +682,12 @@ pub(crate) fn fetch_cargo(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if "REDOXER_TOOLCHAIN" is available.
|
/// Check if "$REDOXER_TOOLCHAIN/bin/cargo" is available.
|
||||||
fn check_toolchain_available() -> bool {
|
fn check_cargo_available() -> bool {
|
||||||
let Ok(dir) = std::env::var("REDOXER_TOOLCHAIN") else {
|
let Ok(dir) = std::env::var("REDOXER_TOOLCHAIN") else {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
PathBuf::from(dir).is_dir()
|
PathBuf::from(dir).join("bin/cargo").is_file()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fetch_remote(
|
pub fn fetch_remote(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user