Skip to content

Commit

Permalink
Do not use add-determinism just now
Browse files Browse the repository at this point in the history
This reverts all the previous commits, and leaves things as they were
before.

There are no binaries for add-determinism anywhere other than in the
repos, getting it to build on Fedora is cumbersome because it needs cc,
and building it on Ubuntu then caching it somehow fails to restore.

Let's not spend too much time; instead, re-visit this once Fedora 42 is
out and we upgrade to GNOME 48.
  • Loading branch information
swsnr committed Dec 22, 2024
1 parent c9b7a53 commit fd64e3c
Showing 1 changed file with 12 additions and 32 deletions.
44 changes: 12 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,33 @@ on:
branches: [main]
tags: v*

env:
ADD_DETERMINISM_VERSION: 0.5.0

jobs:
install-add-determinism:
runs-on: ubuntu-latest
steps:
- uses: actions/cache/restore@v4
id: cache-add-determinism
with:
path: ${{ runner.tool_cache }}/add-determinism
key: add-determinism-bin-${{ env.ADD_DETERMINISM_VERSION }}
lookup-only: true
- uses: dtolnay/rust-toolchain@stable
if: steps.cache-add-determinism.outputs.cache-hit != 'true'
- run: cargo install --root ${{ runner.tool_cache }}/add-determinism --version '${{ env.ADD_DETERMINISM_VERSION }}' add-determinism
if: steps.cache-add-determinism.outputs.cache-hit != 'true'
- uses: actions/cache/save@v4
if: steps.cache-add-determinism.outputs.cache-hit != 'true'
with:
path: ${{ runner.tool_cache }}/add-determinism
key: ${{ steps.cache-add-determinism.outputs.cache-primary-key }}

build:
# Run build on main as well to make sure it's working before we make a release
runs-on: ubuntu-latest
needs: install-add-determinism
container:
# Fedora 41 ships GNOME 47, i.e. the version we currently support
image: docker.io/fedora:41
steps:
# Install zstd to restore cache
- run: dnf install -y --setopt=install_weak_deps=False git gettext gnome-shell zstd
- uses: actions/cache/restore@v4
with:
path: ${{ runner.tool_cache }}/add-determinism
key: add-determinism-bin-${{ env.ADD_DETERMINISM_VERSION }}
fail-on-cache-miss: true
- run: echo "${{ runner.tool_cache }}/add-determinism/bin" >> $GITHUB_PATH
# TODO: Stip timestamps from ZIP with strip-nondeterminism once 0.4.3 or newer are available in Fedora.cancel-timeout-minutes:
# With 0.5.0 we can set timestamps to the date of the current commit:
#
# env SOURCE_DATE_EPOCH=$(git show --no-patch --format=%ct HEAD) add-determinism dist/*.zip
#
# With 0.4.3 we need to reset to the minimal ZIP date because add-determinism retains timestamps older than
# SOURCE_DATE_EPOCH in this version. We also need to force it to use the JAR handler for ZIP files.
#
# SOURCE_DATE_EPOCH=(date -d1980-01-01T00:00:00Z +'%s') add-determinism --ignore-extension --handler jar
#
- name: Install git, gettext, and gnome-shell
run: dnf install -y --setopt=install_weak_deps=False git gettext gnome-shell
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: "npm"
- run: npm ci
- run: npm run pack
- run: env OURCE_DATE_EPOCH="$(git show --no-patch --format=%ct HEAD)" add-determinism dist/[email protected]
- run: b2sum *.zip > B2SUMS.txt
working-directory: dist
- uses: actions/upload-artifact@v4
Expand Down

0 comments on commit fd64e3c

Please sign in to comment.