Skip to content

Commit

Permalink
Stop using the "production" profile to build releases
Browse files Browse the repository at this point in the history
The added benefit is not even measurable, but the build times are huge. The production
profile is still available in the project's cargo configuration if it's ever needed.
  • Loading branch information
fredmorcos committed Apr 24, 2022
1 parent b9c7571 commit dd70bb6
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
steps:
- id: set-matrix
shell: python
env:
ENABLE_PRODUCTION: ${{startsWith(github.ref, 'refs/tags/')}}
# env:
# ENABLE_PRODUCTION: ${{startsWith(github.ref, 'refs/tags/')}}
run: |
import os
import json
Expand Down Expand Up @@ -69,11 +69,11 @@ jobs:
]
}
if os.getenv('ENABLE_PRODUCTION', default='false') == 'true':
matrix['build-config'].append({
'id': 'production',
'args': '--profile production',
})
# if os.getenv('ENABLE_PRODUCTION', default='false') == 'true':
# matrix['build-config'].append({
# 'id': 'production',
# 'args': '--profile production',
# })
print('::set-output name=matrix::%s' % json.dumps(matrix))
Expand Down Expand Up @@ -229,18 +229,22 @@ jobs:
--all-features --all-targets
${{matrix.build-config.args}}
- name: Create tarball
if: ${{matrix.build-config.id == 'production'}}
if: >-
${{matrix.build-config.id == 'release' &&
startsWith(github.ref, 'refs/tags/')}}
shell: bash
run: |
export PKG=tvrank-${{steps.tag.outputs.tag}}-${{matrix.os.name}}
mkdir $PKG
cp target/production/tvrank $PKG/tvrank${{matrix.os.execext}}
cp target/release/tvrank $PKG/tvrank${{matrix.os.execext}}
cp LICENSE $PKG/LICENSE
cp README.md $PKG/README.md
cp -r changelogs $PKG/changelogs
${{matrix.os.pkgcmd}}
- name: Upload tarball
if: ${{matrix.build-config.id == 'production'}}
if: >-
${{matrix.build-config.id == 'release' &&
startsWith(github.ref, 'refs/tags/')}}
uses: actions/upload-artifact@v2
with:
name: >-
Expand Down

0 comments on commit dd70bb6

Please sign in to comment.