Skip to content

Commit

Permalink
Consolidate tests; fix automerge job (acquire-project#27)
Browse files Browse the repository at this point in the history
* Consolidate tests; fix automerge job

* Update test_pr.yml

* Remove automerge from test_pr.yml.

* Update test_pr.yml

* Re-add automerge job.

* wip

* Re-add typing test

* Specify the Test workflow must be completed before running Automerge

* Update automerge.yml

* Remove standalone automerge job.

* Move automerge logic into test_pr.yml.

* Nightly tag and release.

* Move PyPI publish to the end of the release workflow.

* Schedule nightly tag at 5:00 AM UTC.
  • Loading branch information
aliddell authored Jul 5, 2023
1 parent 217a1da commit 238cd35
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 307 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/auto-merge.yml

This file was deleted.

92 changes: 0 additions & 92 deletions .github/workflows/nightly-release.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/nightly-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update nightly tag

on:
schedule:
- cron: "0 5 * * *" # runs at 5:00 AM UTC

jobs:
nightly-tag:
name: Update nightly tag
runs-on: ubuntu-latest

permissions: write-all

steps:
- name: Checkout local repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}

- name: Update nightly tag
run: git tag -f nightly

- name: Push tag
run: git push origin nightly --force
48 changes: 42 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*.*.*"
- "nightly"

jobs:
build:
Expand All @@ -28,6 +29,27 @@ jobs:
ref: main
submodules: recursive

- name: Checkout runtime nightly
if: ${{github.ref_name == 'nightly'}}
run: |
git fetch --tags
git checkout nightly
git submodule update --recursive
working-directory: ${{github.workspace}}/acquire-video-runtime

- name: Set config to pull nightly drivers
if: ${{github.ref_name == 'nightly'}}
run: |
cat >drivers.json <<EOF
{
"acquire-driver-common": "nightly",
"acquire-driver-zarr": "nightly",
"acquire-driver-egrabber": "nightly",
"acquire-driver-hdcam": "nightly"
}
EOF
shell: bash

- name: Build (macOS)
if: matrix.platform == 'macos-latest'
uses: messense/maturin-action@v1
Expand Down Expand Up @@ -92,14 +114,28 @@ jobs:
mkdir -p dist
mv ${{steps.download.outputs.download-path}}/*/*.whl dist
- name: Publish wheels
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

- uses: marvinpinto/action-automatic-releases@latest
- name: Tagged release
if: ${{ github.ref_name != 'nightly' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ github.token }}
prerelease: false
files: |
dist/*.whl
- name: Nightly release
if: ${{ github.ref_name == 'nightly' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.PAT }}
automatic_release_tag: "nightly"
prerelease: true
title: "Nightly Release"
files: |
dist/*.whl
- name: Publish wheels
if: ${{ github.ref_name != 'nightly' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
Loading

0 comments on commit 238cd35

Please sign in to comment.