Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pipelines #80

Merged
merged 13 commits into from
Jul 22, 2023
Merged

Conversation

blackheaven
Copy link
Collaborator

@blackheaven blackheaven commented Jun 29, 2023

  • Save latest hsec-tools as artifact
  • Reuse artifact to check new advisories
    • Only run on new/changed advisories
  • Don't rebuild hsec-tools on new advisories

For reference, I squeezed the docker image: https://gautier.difolco.dev/2023-07/nix-docker-optimization/

@blackheaven blackheaven marked this pull request as ready for review June 30, 2023 09:33
@blackheaven blackheaven changed the title WIP Improve pipelines Improve pipelines Jul 4, 2023
@blackheaven
Copy link
Collaborator Author

Eventually!

@frasertweedale can you have a look please?

@akacase
Copy link
Collaborator

akacase commented Jul 14, 2023

@blackheaven -- This is great! I like the docker addition. Should we strive for parity by also adding a Dockerfile in the main repository to replicate (sort of) what we have in Nix?

@blackheaven
Copy link
Collaborator Author

It could be a good idea.

At some point, we also might publish GitHub packages too.

@frasertweedale
Copy link
Collaborator

@blackheaven I promise I haven't forgotten about this PR :) I shall re-review it this week.

@akacase akacase mentioned this pull request Jul 20, 2023
1 task
@mihaimaruseac
Copy link
Collaborator

We need to resolve the nix conflict.

@blackheaven
Copy link
Collaborator Author

I'll handle it tomorrow morning

@blackheaven
Copy link
Collaborator Author

Ready :)

@frasertweedale
Copy link
Collaborator

haskell-ci regenerate fails because the patch does not apply. (I'm using haskell-ci v1.6.3). I'll look into it tomorrow, if I can find some time.

Copy link
Collaborator

@frasertweedale frasertweedale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the following haskell-ci.patch will achieve the desired result (that is, regenerates and cleanly applies the patch to haskell-ci.yml resulting unchanged file content).

diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml
index 96282c2..e40c573 100644
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -19,6 +19,21 @@
 jobs:
+  tools_changed:
+    continue-on-error: true
+    runs-on: ubuntu-20.04
+    outputs:
+      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+    steps:
+      - id: skip_check
+        uses: fkirc/[email protected]
+        with:
+          concurrent_skipping: "never"
+          skip_after_successful_duplicate: "true"
+          paths: '["code/**"]'
+          do_not_skip: '["push", "workflow_dispatch", "schedule"]'
   linux:
     name: Haskell-CI - Linux - ${{ matrix.compiler }}
+    needs: tools_changed
+    if: ${{ needs.tools_changed.outputs.should_skip != 'true' }}
     runs-on: ubuntu-20.04
     timeout-minutes:
       60

When the regenerate issue is resolved feel free to merge it. I am still not 100% convinced that everything will work as intended (same doubts as in previous comments). But it's hard to fit all the cases in my head, so I think it's best to merge and then we can observe the changes in action.

@frasertweedale frasertweedale merged commit 3632b7c into haskell:main Jul 22, 2023
10 checks passed
@blackheaven
Copy link
Collaborator Author

I'll handle main build failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants