Clean-up for new injection approach

This commit is contained in:
Antoine Martin 2024-09-09 18:48:53 -04:00
parent 9fc1624b23
commit 9eb68351f8
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -17,64 +17,60 @@ jobs:
container: container:
image: alpine:edge image: alpine:edge
env: env:
CI_PROJECT_NAME: git-annex
CI_ALPINE_TARGET_RELEASE: edge CI_ALPINE_TARGET_RELEASE: edge
steps: steps:
- name: Environment setup - name: Environment setup
run: apk add nodejs git cabal patch wget run: apk add nodejs git cabal patch
- name: Repo pull - name: Repo pull
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 500 fetch-depth: 1
ref: ${{ inputs.ref_name }} ref: ${{ inputs.ref_name }}
- name: Config generation - name: Config generation
run: | run: |
wget 'https://lab.ilot.io/mirrors/git-annex/-/raw/gitlab-ci/ghc-9.8.patch' patch -p1 -i .forgejo/patches/ghc-9.8.patch
patch -p1 -i ghc-9.8.patch
HOME="${{ github.workspace}}"/cabal_cache cabal update HOME="${{ github.workspace}}"/cabal_cache cabal update
HOME="${{ github.workspace}}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted" HOME="${{ github.workspace}}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted"
find . mv cabal.project.freeze git-annex-$CI_ALPINE_TARGET_RELEASE.config
mv cabal.project.freeze git-annex-${{ input.ref_name }}-$CI_ALPINE_TARGET_RELEASE.config
- name: Package upload - name: Package upload
uses: forgejo/upload-artifact@v3 uses: forgejo/upload-artifact@v3
with: with:
name: cabalconfigedge name: cabalconfigedge
path: git-annex* path: git-annex*.config
cabal-config-v320: cabal-config-v320:
name: Generate cabal config for edge name: Generate cabal config for edge
runs-on: x86_64 runs-on: x86_64
container: container:
image: alpine:3.20 image: alpine:3.20
env: env:
CI_PROJECT_NAME: git-annex
CI_ALPINE_TARGET_RELEASE: v3.20 CI_ALPINE_TARGET_RELEASE: v3.20
steps: steps:
- name: Environment setup - name: Environment setup
run: apk add nodejs git cabal patch wget run: apk add nodejs git cabal patch
- name: Repo pull - name: Repo pull
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 500 fetch-depth: 1
ref: ${{ inputs.ref_name }} ref: ${{ inputs.ref_name }}
- name: Config generation - name: Config generation
run: | run: |
wget 'https://lab.ilot.io/mirrors/git-annex/-/raw/gitlab-ci/ghc-9.8.patch' patch -p1 -i .forgejo/patches/ghc-9.8.patch
patch -p1 -i ghc-9.8.patch
HOME="${{ github.workspace }}"/cabal_cache cabal update HOME="${{ github.workspace }}"/cabal_cache cabal update
HOME="${{ github.workspace }}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted" HOME="${{ github.workspace }}"/cabal_cache cabal v2-freeze --shadow-installed-packages --strong-flags --flags="+assistant +webapp +pairing +production +torrentparser +magicmime +benchmark -debuglocks +dbus +networkbsd +gitlfs +httpclientrestricted"
mv cabal.project.freeze git-annex-${{ input.ref_name }}-$CI_ALPINE_TARGET_RELEASE.config mv cabal.project.freeze git-annex-$CI_ALPINE_TARGET_RELEASE.config
find .
- name: Package upload - name: Package upload
uses: forgejo/upload-artifact@v3 uses: forgejo/upload-artifact@v3
with: with:
name: cabalconfig320 name: cabalconfig320
path: git-annex* path: git-annex*.config
upload-tarball: upload-tarball:
name: Upload to generic repo name: Upload to generic repo
runs-on: x86_64 runs-on: x86_64
needs: [cabal-config-edge,cabal-config-v320] needs: [cabal-config-edge,cabal-config-v320]
container: container:
image: alpine:latest image: alpine:latest
env:
CI_REF_NAME: ${{ inputs.ref_name }}${{ github.ref_name}}
steps: steps:
- name: Environment setup - name: Environment setup
run: apk add nodejs curl findutils run: apk add nodejs curl findutils
@ -83,5 +79,5 @@ jobs:
- name: Package deployment - name: Package deployment
run: | run: |
find . find .
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfigedge/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-${{ inputs.ref_name }}-edge.cabal curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfigedge/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/$CI_REF_NAME/git-annex-$CI_REF_NAME-edge.cabal
curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfig320/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/${{ inputs.ref_name }}/git-annex-${{ inputs.ref_name }}-v320.cabal curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./cabalconfig320/git-annex.cabal ${{ github.server_url }}/api/packages/mirrors/generic/git-annex/$CI_REF_NAME/git-annex-$CI_REF_NAME-v320.cabal