Skip to content

Commit

Permalink
Use rsync instead of _stage_ci_files.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dixonjoel committed Dec 6, 2023
1 parent fa35dd3 commit 51608f3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
File renamed without changes.
7 changes: 7 additions & 0 deletions .github/artifacts/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .github/artifacts/poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
15 changes: 15 additions & 0 deletions .github/artifacts/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
name = "Stage artifacts"
version = "0.1"
description = "Stage artifacts for the CI build"
authors = ["NI <[email protected]>"]
readme = "README.md" # apply the repo readme to the package as well
repository = "https://github.com/ni/ni-apis/"
license = "MIT"

[tool.poetry.dependencies]
python = "^3.9"

[build-system]
requires = ["poetry-core>=1.2.0"]
build-backend = "poetry.core.masonry.api"
23 changes: 17 additions & 6 deletions .github/workflows/create_ci_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
workflow_call:
workflow_dispatch:

env:
POETRY_VERSION: 1.2.2
PYTHON_VERSION: 3.9

jobs:
build:
name: 'Proto Artifacts'
Expand All @@ -14,21 +18,28 @@ jobs:
uses: actions/checkout@v2

- name: Setup python3
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: ${{ env.PYTHON_VERSION }}

- name: Install build dependencies
run: python -m pip install -r python_build_requirements.txt
- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Cache virtualenv
uses: actions/cache@v3
with:
path: .github/check_protos/.venv
key: create-artifacts-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('.github/artifacts/poetry.lock') }}

- name: Stage Client Files
run: |
python ./.github/artifacts/stage_ci_files.py -o ${{ runner.temp }}/staging/
rsync -av --prune-empty-dirs --include "*/" --include "*.proto" --exclude "*" ni/ ${{ runner.temp }}/staging/ni/
- name: Upload Windows Client Files Artifact
uses: actions/upload-artifact@v2
with:
name: ni-apis
path: |
${{ runner.temp }}/staging
${{ runner.temp }}/staging/ni
retention-days: 5
9 changes: 0 additions & 9 deletions python_build_requirements.txt

This file was deleted.

0 comments on commit 51608f3

Please sign in to comment.