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

Iterating on Github Action #135

Merged
merged 37 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b49b072
Iterating on Github Action
keepingitneil Jan 11, 2024
dec01f9
build docs
keepingitneil Jan 11, 2024
f56e034
remove steps for testing
keepingitneil Jan 11, 2024
60f0b12
undo
keepingitneil Jan 11, 2024
ece1fe3
checkout with submodules
keepingitneil Jan 11, 2024
e1e2b61
livekit.rtc
keepingitneil Jan 12, 2024
040b846
Try a venv
keepingitneil Jan 12, 2024
580c641
venv
keepingitneil Jan 12, 2024
f20b832
debugging
keepingitneil Jan 12, 2024
9a91e51
iterating
keepingitneil Jan 12, 2024
47b49db
iterating
keepingitneil Jan 12, 2024
63de4a0
iter
keepingitneil Jan 12, 2024
a50b38e
iter
keepingitneil Jan 12, 2024
fcecc2e
iter
keepingitneil Jan 12, 2024
1b17281
iter
keepingitneil Jan 12, 2024
6371f36
iter
keepingitneil Jan 12, 2024
78b7d98
iter
keepingitneil Jan 12, 2024
2dd6504
iter
keepingitneil Jan 12, 2024
6a2231f
ffi
keepingitneil Jan 12, 2024
bef9686
trying
keepingitneil Jan 12, 2024
ea4b090
build wheel
keepingitneil Jan 12, 2024
d0ff2db
build wheel
keepingitneil Jan 12, 2024
7ecd554
iter
keepingitneil Jan 12, 2024
a6430e8
iter
keepingitneil Jan 12, 2024
ead6542
iter
keepingitneil Jan 12, 2024
d3f75bc
iter
keepingitneil Jan 12, 2024
75d0759
iter
keepingitneil Jan 12, 2024
13ac800
iter
keepingitneil Jan 12, 2024
0f47df1
iter
keepingitneil Jan 12, 2024
f040e78
iter
keepingitneil Jan 12, 2024
f2e2ab1
iter
keepingitneil Jan 12, 2024
1ad304e
iter
keepingitneil Jan 12, 2024
d2ca9a1
iter
keepingitneil Jan 12, 2024
24a504c
iter
keepingitneil Jan 12, 2024
f5e5f5b
iter
keepingitneil Jan 12, 2024
5148117
iter
keepingitneil Jan 12, 2024
3804542
iter
keepingitneil Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ jobs:
uses: ./.github/workflows/build-docs.yml
with:
package_dir: "livekit-api"
docs_entrypoint: "livekit-api/livekit/api"
package_name: "livekit.api"
secrets: inherit
46 changes: 21 additions & 25 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@
name: Build Docs

on:
workflow_dispatch:
inputs:
package_dir:
required: true
type: string
package_name:
required: true
type: string
test:
required: false
type: boolean
default: false
workflow_call:
inputs:
package_dir:
required: true
type: string
docs_entrypoint:
package_name:
required: true
type: string
secrets:
Expand All @@ -34,36 +46,20 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Generate Egg Info
run: python ${{ inputs.package_dir }}/setup.py egg_info

- name: Find requires.txt
run: |
# Search for requirements.txt file and store its content in an environment variable
REQUIREMENTS_FILE=$(find . -type f -name "requires.txt")
echo "Found requires.txt file at: $REQUIREMENTS_FILE"
if [ -n "$REQUIREMENTS_FILE" ]; then
echo "REQUIREMENTS_FILE=$REQUIREMENTS_FILE" >> $GITHUB_ENV
else
echo "No requiress.txt file found."
fi
- name: Debug
run: echo $REQUIREMENTS_FILE

- name: Install Requirements From Egg Info
run: python -m pip install -r $REQUIREMENTS_FILE
with:
submodules: recursive
Copy link
Member

Choose a reason for hiding this comment

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

Do you need submodules?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah - pip install fails without it


- name: Install Package to Document
run: python -m pip install -e ${{ inputs.package_dir }}
run: python -m pip install ${{ inputs.package_dir }}/

- name: Download ffi
run: "[[ ${{ inputs.package_name }} = 'livekit.rtc' ]] && pip install requests && python livekit-rtc/rust-sdks/download_ffi.py --output $(python -m site --user-site)/livekit/rtc/resources"
Copy link
Member

Choose a reason for hiding this comment

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

Only necessary for livekit-rtc

Copy link
Member

Choose a reason for hiding this comment

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

I think you can simplify this and move to build-rtc.yml


- name: Install pdoc
run: python -m pip install --upgrade pdoc
run: pip install --upgrade pdoc

- name: Build Docs
run: python -m pdoc ${{ inputs.docs_entrypoint }} --docformat=google --output-dir docs
run: python -m pdoc ${{ inputs.package_name }} --docformat=google --output-dir docs

- name: S3 Upload
run: aws s3 cp docs/ s3://livekit-docs/${{ inputs.package_dir }} --recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ jobs:
uses: ./.github/workflows/build-docs.yml
with:
package_dir: "livekit-protocol"
docs_entrypoint: "livekit-protocol/livekit/protocol"
package_name: "livekit.protocol"
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/build-rtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ jobs:
uses: ./.github/workflows/build-docs.yml
with:
package_dir: "livekit-rtc"
docs_entrypoint: "livekit-rtc/livekit/rtc"
package_name: "livekit.rtc"
secrets: inherit
Loading