diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index be3fd5e..bb99809 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -65,7 +65,7 @@ jobs: runner: warp-ubuntu-latest-x64-16x steps: - # - uses: WarpBuilds/rust-cache@v2 + - uses: WarpBuilds/rust-cache@v2 - name: Install dependencies run: | @@ -92,17 +92,17 @@ jobs: echo diff && git diff --cached --name-status echo ls-files && git ls-files --others --exclude-standard - # - name: Build binary - # run: | - # git config --global --add safe.directory "$(pwd)" - # . $HOME/.cargo/env - # cargo build --release --target ${{ matrix.configs.target }} - - # - name: Upload artifact - # uses: actions/upload-artifact@v4 - # with: - # name: ${{ env.OUTPUT_FILENAME }} - # path: target/${{ matrix.configs.target }}/release/rbuilder + - name: Build binary + run: | + git config --global --add safe.directory "$(pwd)" + . $HOME/.cargo/env + cargo build --release --target ${{ matrix.configs.target }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.OUTPUT_FILENAME }} + path: target/${{ matrix.configs.target }}/release/rbuilder draft-release: name: Draft release diff --git a/src/build_info.rs b/src/build_info.rs index 87a68f1..6808554 100644 --- a/src/build_info.rs +++ b/src/build_info.rs @@ -6,18 +6,19 @@ mod internal { use internal::{ BUILT_TIME_UTC, FEATURES, GIT_COMMIT_HASH_SHORT, GIT_DIRTY, GIT_HEAD_REF, PROFILE, - RUSTC_VERSION, + RUSTC_VERSION, CI_PLATFORM, }; use rbuilder::utils::build_info::Version; pub fn print_version_info() { - println!("commit: {}", GIT_COMMIT_HASH_SHORT.unwrap_or_default()); - println!("dirty: {}", GIT_DIRTY.unwrap_or_default()); - println!("branch: {}", GIT_HEAD_REF.unwrap_or_default()); - println!("build_time: {}", BUILT_TIME_UTC); - println!("rustc: {}", RUSTC_VERSION); - println!("features: {:?}", FEATURES); - println!("profile: {}", PROFILE); + // println!("dirty: {}", GIT_DIRTY.unwrap_or_default()); + println!("commit: {}", GIT_COMMIT_HASH_SHORT.unwrap_or_default()); + println!("branch: {}", GIT_HEAD_REF.unwrap_or_default()); + println!("build_platform: {}", CI_PLATFORM); + println!("build_time: {}", BUILT_TIME_UTC); + println!("features: {:?}", FEATURES); + println!("profile: {}", PROFILE); + println!("rustc: {}", RUSTC_VERSION); } pub fn rbuilder_version() -> Version { @@ -26,11 +27,11 @@ pub fn rbuilder_version() -> Version { if let Some(hash) = GIT_COMMIT_HASH_SHORT { commit.push_str(hash); } - if let Some(dirty) = GIT_DIRTY { - if dirty { - commit.push_str("-dirty"); - } - } + // if let Some(dirty) = GIT_DIRTY { + // if dirty { + // commit.push_str("-dirty"); + // } + // } if commit.is_empty() { commit.push_str("unknown"); }