Skip to content

Commit

Permalink
Disable arm build
Browse files Browse the repository at this point in the history
  • Loading branch information
salamaashoush committed May 27, 2024
1 parent 48db78b commit 35c359b
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 63 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,67 +112,67 @@ jobs:
with:
name: pactup-linux
path: target/x86_64-unknown-linux-gnu/release/pactup
# Unfortunatly, No pact binary is available for linux arm
# build_static_arm_binary:
# name: "Build ARM binary"
# strategy:
# matrix:
# include:
# - arch: arm64
# rust_target: aarch64-unknown-linux-gnu
# docker_image: arm64v8/ubuntu
# docker_platform: aarch64
# - arch: arm32
# rust_target: armv7-unknown-linux-gnueabihf
# docker_image: arm32v7/ubuntu
# docker_platform: armv7
# runs-on: ubuntu-latest
# env:
# RUST_TARGET: ${{ matrix.rust_target }}
# steps:
# - name: Set up QEMU
# id: qemu
# uses: docker/setup-qemu-action@v3
# - uses: hecrj/setup-rust-action@v2
# with:
# rust-version: ${{env.RUST_VERSION}}
# - uses: Swatinem/rust-cache@v2
# with:
# key: arm-binary-${{ matrix.arch }}
# - name: "Download `cross` crate"
# run: cargo install cross
# - uses: actions/checkout@v4
# - name: "Build release"
# run: cross build --target $RUST_TARGET --release
# - uses: uraimo/[email protected]
# name: Sanity test
# with:
# arch: ${{matrix.docker_platform}}
# distro: ubuntu18.04

build_static_arm_binary:
name: "Build ARM binary"
strategy:
matrix:
include:
- arch: arm64
rust_target: aarch64-unknown-linux-gnu
docker_image: arm64v8/ubuntu
docker_platform: aarch64
- arch: arm32
rust_target: armv7-unknown-linux-gnueabihf
docker_image: arm32v7/ubuntu
docker_platform: armv7
runs-on: ubuntu-latest
env:
RUST_TARGET: ${{ matrix.rust_target }}
steps:
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{env.RUST_VERSION}}
- uses: Swatinem/rust-cache@v2
with:
key: arm-binary-${{ matrix.arch }}
- name: "Download `cross` crate"
run: cargo install cross
- uses: actions/checkout@v4
- name: "Build release"
run: cross build --target $RUST_TARGET --release
- uses: uraimo/[email protected]
name: Sanity test
with:
arch: ${{matrix.docker_platform}}
distro: ubuntu18.04

# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}
# # Not required, but speeds up builds by storing container images in
# # a GitHub package registry.
# githubToken: ${{ github.token }}

env: |
RUST_LOG: pactup=debug
# env: |
# RUST_LOG: pactup=debug

dockerRunArgs: |
--volume "${PWD}/target/${{matrix.rust_target}}/release:/artifacts"
# dockerRunArgs: |
# --volume "${PWD}/target/${{matrix.rust_target}}/release:/artifacts"

# Set an output parameter `uname` for use in subsequent steps
run: |
echo "Hello from $(uname -a)"
/artifacts/pactup --version
echo "pactup install 4.11"
/artifacts/pactup install 4.11
echo "pactup exec --using=4.11 -- pact --version"
/artifacts/pactup exec --using=4.11 -- pact --version
# # Set an output parameter `uname` for use in subsequent steps
# run: |
# echo "Hello from $(uname -a)"
# /artifacts/pactup --version
# echo "pactup install 4.11"
# /artifacts/pactup install 4.11
# echo "pactup exec --using=4.11 -- pact --version"
# /artifacts/pactup exec --using=4.11 -- pact --version

- uses: actions/upload-artifact@v3
with:
name: pactup-${{ matrix.arch }}
path: target/${{ env.RUST_TARGET }}/release/pactup
# - uses: actions/upload-artifact@v3
# with:
# name: pactup-${{ matrix.arch }}
# path: target/${{ env.RUST_TARGET }}/release/pactup

ensure_commands_markdown_is_up_to_date:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Options:
[env: PACTUP_PACT_DIR]
--use-on-cd
Print the script to change Node versions every directory change
Print the script to change Pact versions every directory change
--log-level <LOG_LEVEL>
The log level of pactup commands
Expand Down
2 changes: 1 addition & 1 deletion src/commands/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct Env {
/// Deprecated. This is the default now.
#[clap(long, hide = true)]
multi: bool,
/// Print the script to change Node versions every directory change
/// Print the script to change Pact versions every directory change
#[clap(long)]
use_on_cd: bool,
}
Expand Down
8 changes: 4 additions & 4 deletions src/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Command for Install {
})?;

debug!(
"Resolved {} into Node version {}",
"Resolved {} into Pact version {}",
Version::Semver(actual_version).v_str().cyan(),
picked_release.tag_name.v_str().cyan()
);
Expand All @@ -100,7 +100,7 @@ impl Command for Install {
})?;

debug!(
"Resolved {} into Node version {}",
"Resolved {} into Pact version {}",
Version::Nightly(nightly_tag).v_str().cyan(),
picked_release.tag_name.v_str().cyan(),
);
Expand Down Expand Up @@ -254,7 +254,7 @@ mod tests {
.expect("Can't install");

let latest_release =
remote_pact_index::latest(&config.pact_4x_repo).expect("Can't get node version list");
remote_pact_index::latest(&config.pact_4x_repo).expect("Can't get pact version list");
let latest_version = latest_release.tag_name.clone();
assert!(config.installations_dir().exists());
assert!(config
Expand All @@ -281,7 +281,7 @@ mod tests {
.expect("Can't install");

let latest_release =
remote_pact_index::latest(&config.pact_5x_repo).expect("Can't get node version list");
remote_pact_index::latest(&config.pact_5x_repo).expect("Can't get pact version list");
let latest_version = latest_release.tag_name.clone();
assert!(config.installations_dir().exists());
assert!(config
Expand Down
2 changes: 1 addition & 1 deletion src/shell/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Shell for Fish {
};
Ok(formatdoc!(
r#"
function __pactup_autoload_hook --on-variable PWD --description 'Change Node version on directory change'
function __pactup_autoload_hook --on-variable PWD --description 'Change Pact version on directory change'
status --is-command-substitution; and return
{autoload_hook}
end
Expand Down

0 comments on commit 35c359b

Please sign in to comment.