From 2e1d61963698f6bd22d7e161191a82acd5f075e4 Mon Sep 17 00:00:00 2001 From: Reese Williams Date: Fri, 26 Jan 2024 16:14:55 +0000 Subject: [PATCH 1/3] Skip ruby build caching for releases --- .github/workflows/preview-release.yaml | 19 ++++++++++--------- librubyfmt/build.rs | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/preview-release.yaml b/.github/workflows/preview-release.yaml index 0764837f..ea7e7435 100644 --- a/.github/workflows/preview-release.yaml +++ b/.github/workflows/preview-release.yaml @@ -6,7 +6,7 @@ on: - completed push: # Run only on trunk pushes that aren't a new tag release - branches: [trunk] + branches: [trunk, reese-preview-release] tags-ignore: "*" env: @@ -14,6 +14,7 @@ env: GEM_HOME: /tmp/.bundle GEM_PATH: /tmp/.bundle TERM: xterm256 + FORCE_FULL_RUBY_BUILD: 1 jobs: bump-tag: @@ -118,11 +119,11 @@ jobs: - uses: actions/download-artifact@v3 with: name: rubyfmt-release-artifact-macos-latest-native - - name: Upload Release - uses: softprops/action-gh-release@v1 - with: - files: rubyfmt-*.tar.gz - fail_on_unmatched_files: true - generate_release_notes: true - prerelease: true - tag_name: ${{ steps.get-latest-tag.outputs.tag }} + # - name: Upload Release + # uses: softprops/action-gh-release@v1 + # with: + # files: rubyfmt-*.tar.gz + # fail_on_unmatched_files: true + # generate_release_notes: true + # prerelease: true + # tag_name: ${{ steps.get-latest-tag.outputs.tag }} diff --git a/librubyfmt/build.rs b/librubyfmt/build.rs index 401698b9..2c95af53 100644 --- a/librubyfmt/build.rs +++ b/librubyfmt/build.rs @@ -47,7 +47,8 @@ fn main() -> Output { // Only rerun this build if the ruby_checkout has changed match old_checkout_sha { - Some(old_sha) if old_sha == new_checkout_sha => {} + Some(old_sha) + if old_sha == new_checkout_sha && !env::var("FORCE_FULL_RUBY_BUILD").is_ok() => {} _ => { make_configure(&ruby_checkout_path)?; run_configure(&ruby_checkout_path)?; From 5163633cc0ee81217f1050066746457c68a9d96f Mon Sep 17 00:00:00 2001 From: Reese Williams Date: Fri, 26 Jan 2024 16:57:27 +0000 Subject: [PATCH 2/3] Rollback testing stuff --- .github/workflows/preview-release.yaml | 18 +++++++++--------- librubyfmt/build.rs | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/preview-release.yaml b/.github/workflows/preview-release.yaml index ea7e7435..3eaa5b19 100644 --- a/.github/workflows/preview-release.yaml +++ b/.github/workflows/preview-release.yaml @@ -6,7 +6,7 @@ on: - completed push: # Run only on trunk pushes that aren't a new tag release - branches: [trunk, reese-preview-release] + branches: [trunk] tags-ignore: "*" env: @@ -119,11 +119,11 @@ jobs: - uses: actions/download-artifact@v3 with: name: rubyfmt-release-artifact-macos-latest-native - # - name: Upload Release - # uses: softprops/action-gh-release@v1 - # with: - # files: rubyfmt-*.tar.gz - # fail_on_unmatched_files: true - # generate_release_notes: true - # prerelease: true - # tag_name: ${{ steps.get-latest-tag.outputs.tag }} + - name: Upload Release + uses: softprops/action-gh-release@v1 + with: + files: rubyfmt-*.tar.gz + fail_on_unmatched_files: true + generate_release_notes: true + prerelease: true + tag_name: ${{ steps.get-latest-tag.outputs.tag }} diff --git a/librubyfmt/build.rs b/librubyfmt/build.rs index 2c95af53..127e34ac 100644 --- a/librubyfmt/build.rs +++ b/librubyfmt/build.rs @@ -46,9 +46,10 @@ fn main() -> Output { let new_checkout_sha = get_ruby_checkout_sha(); // Only rerun this build if the ruby_checkout has changed + // boop match old_checkout_sha { Some(old_sha) - if old_sha == new_checkout_sha && !env::var("FORCE_FULL_RUBY_BUILD").is_ok() => {} + if old_sha == new_checkout_sha && env::var("FORCE_FULL_RUBY_BUILD").is_err() => {} _ => { make_configure(&ruby_checkout_path)?; run_configure(&ruby_checkout_path)?; From b4c201b2b456395ce4a57b049b2099555261130e Mon Sep 17 00:00:00 2001 From: Reese Williams Date: Fri, 26 Jan 2024 16:59:27 +0000 Subject: [PATCH 3/3] comment --- librubyfmt/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/librubyfmt/build.rs b/librubyfmt/build.rs index 127e34ac..296b7490 100644 --- a/librubyfmt/build.rs +++ b/librubyfmt/build.rs @@ -46,7 +46,6 @@ fn main() -> Output { let new_checkout_sha = get_ruby_checkout_sha(); // Only rerun this build if the ruby_checkout has changed - // boop match old_checkout_sha { Some(old_sha) if old_sha == new_checkout_sha && env::var("FORCE_FULL_RUBY_BUILD").is_err() => {}