From 53b3eb49640b2715e49ce7462017a874987b61dc Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 23 Apr 2024 09:46:06 +0200 Subject: [PATCH 1/2] Remove scheduled pixi auto-update and add scheduled build with latest dependencies --- .github/workflows/pixi-auto-update-ci.yml | 3 --- .github/workflows/pixi-ci.yml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pixi-auto-update-ci.yml b/.github/workflows/pixi-auto-update-ci.yml index d55756b..12ee607 100644 --- a/.github/workflows/pixi-auto-update-ci.yml +++ b/.github/workflows/pixi-auto-update-ci.yml @@ -1,9 +1,6 @@ name: Pixi auto update on: - # At 00:00 of every monday - schedule: - - cron: "0 0 * * 1" # on demand workflow_dispatch: diff --git a/.github/workflows/pixi-ci.yml b/.github/workflows/pixi-ci.yml index 735fcf1..46a3595 100644 --- a/.github/workflows/pixi-ci.yml +++ b/.github/workflows/pixi-ci.yml @@ -1,7 +1,18 @@ name: CI Workflow on: + # on demand + workflow_dispatch: + inputs: + delete_pixi_lock: + description: 'If true, delete pixi.lock, to test against the latest version of dependencies.' + required: true + default: 'false' pull_request: + schedule: + # * is a special character in YAML so you have to quote this string + # Execute a "nightly" build twice a week 2 AM UTC + - cron: '0 2 * * 2,5' jobs: build-with-pixi: @@ -16,6 +27,15 @@ jobs: steps: - uses: actions/checkout@v4 + # On periodic jobs and when delete_pixi_lock option is true, delete the pixi.lock to check that the project compiles with latest version of dependencies + - name: Delete pixi.lock on scheduled jobs or if delete_pixi_lock is true + if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.delete_pixi_lock == 'true') + shell: bash + run: | + rm -rf pixi.lock + pixi list + cat pixi.lock + - name: Print used environment shell: bash run: | From afe21b75169153606d7d5ce2d31f6a5e9c5cf209 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 23 Apr 2024 10:53:18 +0200 Subject: [PATCH 2/2] Do not call pixi when pixi is not installed Co-authored-by: Pavel Zwerschke --- .github/workflows/pixi-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pixi-ci.yml b/.github/workflows/pixi-ci.yml index 46a3595..f4e8113 100644 --- a/.github/workflows/pixi-ci.yml +++ b/.github/workflows/pixi-ci.yml @@ -32,9 +32,7 @@ jobs: if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.delete_pixi_lock == 'true') shell: bash run: | - rm -rf pixi.lock - pixi list - cat pixi.lock + rm pixi.lock - name: Print used environment shell: bash