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

[CI] Add CircleCI Pipelines #33

Merged
merged 157 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
4ce0121
Add .circleci/config.yml (#4)
HaiyiMei Apr 17, 2024
600a22b
Update Docker image to adamrehn/ue4-full:5.3.2-ltsc2022-vs2022
HaiyiMei Apr 17, 2024
3c1617f
Update Docker image to ghcr.io/epicgames/unreal-engine:dev-5.3.2
HaiyiMei Apr 17, 2024
615d8d5
Update plugin build
HaiyiMei Apr 17, 2024
00265eb
debug
HaiyiMei Apr 17, 2024
f1e4ada
debug
HaiyiMei Apr 17, 2024
19a36a7
Update config.yaml
HaiyiMei Apr 17, 2024
3e0c6d4
[Update] using matrix for workflows
HaiyiMei Apr 18, 2024
a95117e
[Fix] bug
HaiyiMei Apr 18, 2024
a094148
Update .circleci/config.yml to include windows job
HaiyiMei Apr 18, 2024
42ad703
Update .circleci/config.yml to install Python 3.10
HaiyiMei Apr 18, 2024
b668295
bug fix
HaiyiMei Apr 18, 2024
a0cc4f8
Update .circleci/config.yml to install Miniconda and Python 3.10, and…
HaiyiMei Apr 18, 2024
436b877
Update Docker command in .circleci/config.yml
HaiyiMei Apr 18, 2024
1391fd3
Update Docker command in .circleci/config.yml
HaiyiMei Apr 18, 2024
61dcd4b
Update Docker command in .circleci/config.yml
HaiyiMei Apr 18, 2024
b789a72
bug
HaiyiMei Apr 18, 2024
daf07e3
fix
HaiyiMei Apr 18, 2024
37db5a6
fix
HaiyiMei Apr 18, 2024
36cd4a2
fix
HaiyiMei Apr 18, 2024
2423c33
fix
HaiyiMei Apr 18, 2024
41f7b5a
Update Docker command in .circleci/config.yml
HaiyiMei Apr 18, 2024
3f13a8b
test new image
HaiyiMei Apr 19, 2024
31748c6
add upload
HaiyiMei Apr 19, 2024
87695fe
fix
HaiyiMei Apr 19, 2024
308e51d
fix
HaiyiMei Apr 19, 2024
7fa9967
fix
HaiyiMei Apr 19, 2024
8ce5fbc
Update CI/CD (#5)
HaiyiMei Apr 22, 2024
360700d
debug
HaiyiMei Apr 22, 2024
f27ff04
debug
HaiyiMei Apr 22, 2024
10e7119
debug
HaiyiMei Apr 22, 2024
69c0a64
test
HaiyiMei Apr 22, 2024
3c787ca
update
HaiyiMei Apr 22, 2024
565f43f
Update plugins manage
HaiyiMei Apr 28, 2024
550e975
add test for unreal
HaiyiMei Apr 28, 2024
8109cff
bug fix
HaiyiMei Apr 28, 2024
7c56931
bug fix
HaiyiMei Apr 28, 2024
264f0da
Update cache keys in continue_config.yml and runner.py
HaiyiMei Apr 28, 2024
94c5939
Update test-unreal job in continue_config.yml
HaiyiMei Apr 28, 2024
1a934da
fix
HaiyiMei May 29, 2024
0adc092
update
HaiyiMei May 30, 2024
38b7f17
update CI
HaiyiMei May 30, 2024
dc96a60
update
HaiyiMei May 30, 2024
c7d60a9
ci: empty commit
HaiyiMei May 30, 2024
d360a0f
update
HaiyiMei May 30, 2024
d1f971e
Update test-unreal job in continue_config.yml
HaiyiMei May 30, 2024
7733fe5
Update test-unreal job in continue_config.yml
HaiyiMei May 30, 2024
d9cd536
update
HaiyiMei May 31, 2024
baa2a1a
ci: test
HaiyiMei May 31, 2024
4753f10
merge test and build
HaiyiMei May 31, 2024
7b09d0a
test
HaiyiMei May 31, 2024
a1f33d7
update
HaiyiMei May 31, 2024
fa57885
Update test-unreal job in continue_config.yml
HaiyiMei May 31, 2024
bf7585b
tmp
HaiyiMei May 31, 2024
05fb728
tmp
HaiyiMei May 31, 2024
e38b5aa
tmp
HaiyiMei Jun 3, 2024
afa762f
test
HaiyiMei Jun 24, 2024
f4145bf
update
HaiyiMei Jun 24, 2024
9d69434
update
HaiyiMei Jun 24, 2024
a54c44a
update blender
HaiyiMei Jun 24, 2024
96b51a8
fix
HaiyiMei Jun 24, 2024
15251c4
fix
HaiyiMei Jun 24, 2024
549ffa5
fix
HaiyiMei Jun 24, 2024
3031bd1
fix
HaiyiMei Jun 24, 2024
6ef8985
fix
HaiyiMei Jun 24, 2024
f5ee9a7
for artifacts
HaiyiMei Jun 24, 2024
85987f0
test
HaiyiMei Jun 24, 2024
b37d0a9
test get version
HaiyiMei Jun 24, 2024
edc9a58
fix
HaiyiMei Jun 24, 2024
b91eb2b
update
HaiyiMei Jun 24, 2024
3a68c94
fix
HaiyiMei Jun 24, 2024
10fa1f8
chore: Update CircleCI configuration for Unreal Plugin and tests
HaiyiMei Jun 24, 2024
f5d6be9
update
HaiyiMei Jun 24, 2024
41c322f
update
HaiyiMei Jun 24, 2024
3e6d25e
-- testing --
HaiyiMei Jun 24, 2024
65baad8
test
HaiyiMei Jun 24, 2024
773f9c5
test
HaiyiMei Jun 24, 2024
d5efafe
test
HaiyiMei Jun 24, 2024
97079db
test
HaiyiMei Jun 24, 2024
b39080c
-- test end --
HaiyiMei Jun 24, 2024
0cf8655
add comments
HaiyiMei Jun 25, 2024
8003558
ci: empty commit
HaiyiMei Jun 25, 2024
5e34409
chore: Update persist_to_workspace root path in continue_config.yml
HaiyiMei Jun 25, 2024
099d6e3
Update: bug fix & add version tag action
HaiyiMei Jun 25, 2024
54c0626
pre-commit
HaiyiMei Jun 25, 2024
f22ae04
Test (#6)
HaiyiMei Jun 25, 2024
0d7c03e
update CLI of publish plugin
HaiyiMei Jun 25, 2024
f6d9ade
fix
HaiyiMei Jun 25, 2024
de8f309
fix
HaiyiMei Jun 25, 2024
416d4d9
fix
HaiyiMei Jun 25, 2024
c6ee5dd
fix
HaiyiMei Jun 25, 2024
024f66f
fix
HaiyiMei Jun 25, 2024
4ca396d
Merge 024f66f93c8aa20b1232821e3949fbe1509ad227 into 0d7c03e4353344e51…
HaiyiMei Jun 25, 2024
2df702a
Update version to v0.6.3
HaiyiMei Jun 25, 2024
8397e7f
Test (#8)
HaiyiMei Jun 25, 2024
3acfc3c
chore: Update continue_config.yml to disable default build and test p…
HaiyiMei Jun 26, 2024
7c04d56
update
HaiyiMei Jun 26, 2024
87d3a55
condition
HaiyiMei Jun 26, 2024
f870179
chore: Update main.py to include dev flag in init_test function call
HaiyiMei Jun 26, 2024
f2fc7a6
test
HaiyiMei Jun 26, 2024
4ed09c3
test
HaiyiMei Jun 26, 2024
99b09ae
chore: Update continue_config.yml to disable default build and test p…
HaiyiMei Jun 26, 2024
08e8903
---- tmp ----
HaiyiMei Jun 26, 2024
17b4344
fix
HaiyiMei Jun 26, 2024
e1c5817
ci: empty commit
HaiyiMei Jun 26, 2024
c3a19dd
test
HaiyiMei Jun 26, 2024
be819aa
fix
HaiyiMei Jun 26, 2024
80bf537
ci: empty commit
HaiyiMei Jun 26, 2024
f3f7c9d
ci: empty commit
HaiyiMei Jun 26, 2024
8aef342
fix
HaiyiMei Jun 26, 2024
6dbab45
fix
HaiyiMei Jun 26, 2024
cd8eefb
fix
HaiyiMei Jun 26, 2024
5a7ac00
chore: Update GitHub Release CLI to version v0.16.2
HaiyiMei Jun 26, 2024
19842d9
Test another (#9)
HaiyiMei Jun 26, 2024
682b783
Test (#10)
HaiyiMei Jun 26, 2024
6684daf
misc
HaiyiMei Jun 26, 2024
b666c8a
Condition (#11)
HaiyiMei Jun 26, 2024
5909011
Testing (#12)
HaiyiMei Jun 26, 2024
919d5ef
fix
HaiyiMei Jun 26, 2024
57087e6
0.6.5 (#13)
HaiyiMei Jun 26, 2024
014418e
Fix-bug (#14)
HaiyiMei Jun 27, 2024
fc42ab9
Test (#15)
HaiyiMei Jun 27, 2024
5850949
Test (#16)
HaiyiMei Jun 27, 2024
7a7745c
Merge branch 'main' into main
HaiyiMei Jun 27, 2024
5b5d175
chore: Refactor release workflow to determine next version and update…
HaiyiMei Jun 27, 2024
f624add
chore: add echo
HaiyiMei Jun 27, 2024
ade5260
bug fix
HaiyiMei Jun 27, 2024
3c91cdf
bug fix of git push
HaiyiMei Jun 27, 2024
11f698a
bug fix
HaiyiMei Jun 27, 2024
c9bb30c
permissions
HaiyiMei Jun 27, 2024
f57da0b
fix
HaiyiMei Jun 27, 2024
74c5800
fix
HaiyiMei Jun 27, 2024
9db55e1
fix
HaiyiMei Jun 27, 2024
f9ec2b8
tmp
HaiyiMei Jun 27, 2024
1287bd0
fix
HaiyiMei Jun 27, 2024
8ac3bde
fix
HaiyiMei Jun 27, 2024
f4f1fc2
fix
HaiyiMei Jun 27, 2024
157cb1e
fix
HaiyiMei Jun 27, 2024
2a7ba2d
fix
HaiyiMei Jun 27, 2024
62a3b01
fix
HaiyiMei Jun 27, 2024
945bdeb
--tmp--
HaiyiMei Jun 27, 2024
40aa34f
fix
HaiyiMei Jun 27, 2024
e395736
fix
HaiyiMei Jun 27, 2024
c52413f
add echo
HaiyiMei Jun 27, 2024
2145528
fix
HaiyiMei Jun 27, 2024
8ffa272
test
HaiyiMei Jun 27, 2024
f7305bb
change to leave comments instead of pushing commit
HaiyiMei Jun 27, 2024
de0c641
fix
HaiyiMei Jun 27, 2024
0d9a7af
chore: Update release workflow to include diff content and suggester …
HaiyiMei Jun 27, 2024
17d3e7d
chore: Update release workflow
HaiyiMei Jun 27, 2024
eadd544
chore: Update XRFeitoriaBpy version to 0.6.0 (#20)
HaiyiMei Jun 27, 2024
6c8515e
[bot] Update plugin info
github-actions[bot] Jun 27, 2024
f85267d
Test3 (#21)
HaiyiMei Jun 27, 2024
fd87e87
Test (#22)
HaiyiMei Jun 28, 2024
b3ff957
chore: Update release workflow to include diff content and suggester …
HaiyiMei Jun 28, 2024
5902c1f
chore: Update release workflow for pushing to PR branch/repo
HaiyiMei Jun 28, 2024
d130a1a
chore: Update the resource_class
HaiyiMei Jun 28, 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
27 changes: 27 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2.1
setup: true
orbs:
path-filtering: circleci/path-filtering@1.0.0

workflows:
generate-config:
jobs:
- path-filtering/filter:
base-revision: main
config-path: .circleci/continue_config.yml
mapping: |
# -- Unreal Plugin -- #
src/XRFeitoriaUnreal/.* build-unreal-plugin true
src/XRFeitoriaUnreal/.* run-unreal-test true
# -- Blender Addon -- #
src/XRFeitoriaBpy/.* build-blender-addon true
src/XRFeitoriaBpy/.* run-blender-test true
# -- tests -- #
xrfeitoria/.* run-unreal-test true
xrfeitoria/.* run-blender-test true
tests/unreal/.* run-unreal-test true
tests/blender/.* run-blender-test true
filters:
# https://circleci.com/docs/workflows/#executing-workflows-for-a-git-tag
tags:
only: /^v\d+\.\d+\.\d+/
261 changes: 261 additions & 0 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
version: 2.1

parameters:
build-unreal-plugin:
type: boolean
default: false
build-blender-addon:
type: boolean
default: false
run-unreal-test:
type: boolean
default: false
run-blender-test:
type: boolean
default: false

jobs:
test-self-host:
machine: true
resource_class: openxrlab/xrfeitoria
steps:
- run:
name: "Check Runner Info"
shell: powershell.exe
command: echo "Hi I'm on Runners!"

unreal-windows:
machine: true
resource_class: openxrlab/xrfeitoria
steps:
- when:
condition: << pipeline.parameters.build-unreal-plugin >> || << pipeline.parameters.run-unreal-test >>
steps:
- checkout
- run:
name: "Build Plugins & Run Tests"
shell: powershell.exe
no_output_timeout: 60m
environment:
BUILD_UNREAL_PLUGIN: << pipeline.parameters.build-unreal-plugin >>
RUN_TEST: << pipeline.parameters.run-unreal-test >>
PYTHONIOENCODING: "utf-8"
command: |
echo "#### Install XRFeitoria Package ####"
conda activate xrfeitoria
python -m pip install .
mkdir src/dist -ErrorAction SilentlyContinue -Force
if ($env:BUILD_UNREAL_PLUGIN -eq 1) {
echo "#### Building Unreal Plugin ####"
python -m xrfeitoria.utils.publish_plugins build-unreal `
-u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
$env:XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)")
$env:XRFEITORIA__DIST_ROOT="$PWD/src"
}
if ($env:RUN_TEST -eq 1) {
echo "#### Running Tests ####"
python -m tests.setup_ci -u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
python -m tests.unreal.main
python -m tests.setup_ci -u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
python -m tests.unreal.main
python -m tests.setup_ci -u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
python -m tests.unreal.main
}
- when:
condition: << pipeline.parameters.build-unreal-plugin >>
steps:
- store_artifacts:
path: src/dist/
destination: Plugins
- persist_to_workspace:
root: .
paths:
- src/dist/

unreal-linux:
parameters:
image:
type: string
default: "ghcr.io/epicgames/unreal-engine:dev-5.3"
docker:
- image: << parameters.image >>
auth:
username: $GHCR_USERNAME
password: $GHCR_TOKEN
working_directory: ~/project
steps:
- when:
condition: << pipeline.parameters.build-unreal-plugin >> || << pipeline.parameters.run-unreal-test >>
steps:
- checkout
- run:
name: Install Miniconda, Python 3.10, and XRFeitoria
command: |
curl -sLo Miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda.sh -b -p $HOME/miniconda
echo "source $HOME/miniconda/bin/activate" >> $BASH_ENV
source $BASH_ENV
conda install -y python=3.10
python -m pip install .
- run:
name: "Build Plugins & Run Tests"
environment:
BUILD_UNREAL_PLUGIN: << pipeline.parameters.build-unreal-plugin >>
RUN_TEST: << pipeline.parameters.run-unreal-test >>
PYTHONIOENCODING: "utf-8"
command: |
mkdir -p /home/ue4/project/src/dist
if [ "$BUILD_UNREAL_PLUGIN" = "1" ]; then
echo "#### Building Unreal Plugin ####"
python -m xrfeitoria.utils.publish_plugins build-unreal -u "/home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor-Cmd"
export XRFEITORIA__DIST_ROOT="/home/ue4/project/src"
export XRFEITORIA__VERSION=`python -c "import xrfeitoria; print(xrfeitoria.__version__)"`
rm -rf /home/ue4/project/src/dist/*-Source.zip # remove source zip, cuz it's uploaded in the win build
fi
if [ "$RUN_TEST" = "1" ]; then
echo "#### Running Tests ####"
# Can't run tests on non-gpu machine
echo "Skipping tests on non-gpu machine"
# python -m tests.setup_ci -u "/home/ue4/UnrealEngine/Engine/Binaries/Linux/UnrealEditor-Cmd"
# python -m tests.unreal.main
fi
- when:
condition: << pipeline.parameters.build-unreal-plugin >>
steps:
- store_artifacts:
when: << pipeline.parameters.build-unreal-plugin >>
path: src/dist/
destination: Plugins
- persist_to_workspace:
when: << pipeline.parameters.build-unreal-plugin >>
root: /home/ue4/project
paths:
- src/dist/

blender:
docker:
- image: linuxserver/blender:3.6.5
steps:
- when:
condition: << pipeline.parameters.build-blender-addon >> || << pipeline.parameters.run-blender-test >>
steps:
- checkout
- run:
name: Install Essential Packages
command: |
apt-get update
apt-get install -y git
- run:
name: Install Miniconda, Python 3.10, and XRFeitoria
command: |
curl -sLo Miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda.sh -b -p $HOME/miniconda
echo "source $HOME/miniconda/bin/activate" >> $BASH_ENV
source $BASH_ENV
conda install -y python=3.10
python -m pip install .
- run:
name: "Build Blender Addon & Run Tests"
environment:
BUILD_BLENDER_ADDON: << pipeline.parameters.build-blender-addon >>
RUN_TEST: << pipeline.parameters.run-blender-test >>
PYTHONIOENCODING: "utf-8"
command: |
if [ "$BUILD_BLENDER_ADDON" = "1" ]; then
echo "#### Building Blender Addon ####"
python -m xrfeitoria.utils.publish_plugins build-blender
export XRFEITORIA__DIST_ROOT="/config/project/src/dist/"
export XRFEITORIA__VERSION=`python -c "import xrfeitoria; print(xrfeitoria.__version__)"`
fi
if [ "$RUN_TEST" = "1" ]; then
echo "#### Running Tests ####"
python -m tests.setup_ci -b /usr/bin/blender
python -m tests.blender.main -b
fi
- when:
condition: << pipeline.parameters.build-blender-addon >>
steps:
- store_artifacts:
path: /config/project/src/dist/
- persist_to_workspace:
root: /config/project
paths:
- src/dist/

publish-github-release:
docker:
- image: cibuilds/base:latest
steps:
- checkout
- attach_workspace:
at: ./artifacts
- run:
name: "Get GitHub Release CLI"
command: |
# https://github.com/tcnksm/ghr
GHR_VERSION="v0.16.2"
GHR_URL="https://github.com/tcnksm/ghr/releases/download/${GHR_VERSION}/ghr_${GHR_VERSION}_linux_amd64.tar.gz"
wget "$GHR_URL" && \
tar xzf ghr_${GHR_VERSION}_linux_amd64.tar.gz && \
mv ghr_${GHR_VERSION}_linux_amd64/ghr /usr/bin/ghr && \
rm -r ghr_${GHR_VERSION}_linux_amd64.tar.gz ghr_${GHR_VERSION}_linux_amd64/
- run:
name: "Publish Release on GitHub"
command: |
VERSION=$(git describe --tags --abbrev=0)
RELEASE_TITLE="XRFeitoria Release $VERSION"
if [ -d "./artifacts/src/dist" ]; then
DIST_PATH="./artifacts/src/dist/"
else
DIST_PATH=""
fi
ghr \
-t ${GITHUB_TOKEN} \
-u ${CIRCLE_PROJECT_USERNAME} \
-r ${CIRCLE_PROJECT_REPONAME} \
-c ${CIRCLE_SHA1} \
-n "${RELEASE_TITLE}" \
-draft \
-generatenotes \
-delete \
${VERSION} ${DIST_PATH}

workflows:
plugin-workflow:
jobs:
# -- Unreal -- #
- test-self-host:
filters:
tags:
only: /^v\d+\.\d+\.\d+/
- unreal-windows:
requires:
- test-self-host
filters:
tags:
only: /^v\d+\.\d+\.\d+/
- unreal-linux:
matrix:
parameters:
image: ["ghcr.io/epicgames/unreal-engine:dev-5.1", "ghcr.io/epicgames/unreal-engine:dev-5.2", "ghcr.io/epicgames/unreal-engine:dev-5.3"]
filters:
tags:
only: /^v\d+\.\d+\.\d+/
# -- Blender -- #
- blender:
filters:
tags:
only: /^v\d+\.\d+\.\d+/
# -- Publish -- #
- publish-github-release:
requires:
- blender
- unreal-windows
- unreal-linux
filters:
branches:
ignore: /.*/
tags:
only: /^v\d+\.\d+\.\d+/
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install pre-commit hook
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
id-token: write
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
Loading