Skip to content

Commit 59edf3d

Browse files
committed
Merge branch 'main' into pr/622
2 parents 4b2fa91 + 806acf2 commit 59edf3d

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

.github/workflows/linux.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ jobs:
66
release:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
10+
- name: Set Head Repo URL Environment Variable
11+
if: github.event_name == 'pull_request'
12+
run: |
13+
echo "HEAD_REPO_URL=${{ github.event.pull_request.head.repo.clone_url }}" >> $GITHUB_ENV
1014
- name: Build
1115
run: ./src/scripts/build.sh
1216
- name: Artifact

src/scripts/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ MKJOBS=${MKJOBS:-2}
2525
COMMIT=`git rev-parse --short=8 HEAD`
2626
BRANCH=`git rev-parse --abbrev-ref HEAD`
2727
CUSTOM=${CUSTOM:-"CI"}
28+
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
2829

2930
REL=${REL:-0}
3031
APPIMG=20240401
@@ -50,4 +51,4 @@ fi
5051

5152
cd ${CWD}
5253

53-
LOCAL_BUILD=0 MKJOBS=${MKJOBS} REL=${REL} BRANCH=${BRANCH} COMMIT=${COMMIT} CUSTOM=${CUSTOM} ./src/scripts/run_docker.sh
54+
HEAD_REPO_URL=${HEAD_REPO_URL} LOCAL_BUILD=0 MKJOBS=${MKJOBS} REL=${REL} BRANCH=${BRANCH} COMMIT=${COMMIT} CUSTOM=${CUSTOM} ./src/scripts/run_docker.sh

src/scripts/build_vfxplatform.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ SDK_VERSION=${SDK_VERSION:-""}
3434
ONLY_SDK=${ONLY_SDK:-0}
3535
SDK_TAR="${DISTFILES}/sdk/friction-sdk-${SDK_VERSION}r8-linux-x86_64.tar"
3636
TAR_VERSION=${TAR_VERSION:-""}
37+
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
3738

3839
# Build SDK
3940
if [ ! -d "${SDK}" ]; then
@@ -68,6 +69,7 @@ COMMIT=${COMMIT} \
6869
TAG=${TAG} \
6970
CUSTOM=${CUSTOM} \
7071
TAR_VERSION=${TAR_VERSION} \
72+
HEAD_REPO_URL=${HEAD_REPO_URL} \
7173
${BUILD}/build_vfxplatform_friction.sh
7274

7375
# Get Friction version

src/scripts/build_vfxplatform_friction.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ COMMIT=${COMMIT:-""}
3232
TAG=${TAG:-""}
3333
CUSTOM=${CUSTOM:-""}
3434
TAR_VERSION=${TAR_VERSION:-""}
35+
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
3536

3637
export PATH="${SDK}/bin:${PATH}"
3738
export PKG_CONFIG_PATH="${SDK}/lib/pkgconfig"
3839
export LD_LIBRARY_PATH="${SDK}/lib:${LD_LIBRARY_PATH}"
3940

41+
FRICTION_REPO_URL=https://github.com/friction2d/friction
42+
if [ "${HEAD_REPO_URL}" != "" ]; then
43+
FRICTION_REPO_URL=${HEAD_REPO_URL}
44+
fi
45+
4046
if [ ! -d "${SDK}" ]; then
4147
echo "MISSING SDK"
4248
exit 1
@@ -57,7 +63,7 @@ fi
5763

5864
if [ ! -d "${BUILD}/friction" ]; then
5965
(cd ${BUILD} ;
60-
git clone https://github.com/friction2d/friction
66+
git clone ${FRICTION_REPO_URL}
6167
cd friction
6268
git checkout ${CHECKOUT}
6369
git submodule update -i --recursive

src/scripts/run_docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ LOCAL_BUILD=${LOCAL_BUILD:-1}
3232
DOWNLOAD_SDK=${DOWNLOAD_SDK:-0}
3333
SDK_VERSION="1.0.0"
3434
TAR_VERSION=${TAR_VERSION:-""}
35+
HEAD_REPO_URL=${HEAD_REPO_URL:-""}
3536

3637
DOCKER="docker run"
37-
DOCKER="${DOCKER} -e REL=${REL} -e MKJOBS=${MKJOBS} -e TAR_VERSION=${TAR_VERSION} -e SDK_VERSION=${SDK_VERSION} -e ONLY_SDK=${ONLY_SDK} -e DOWNLOAD_SDK=${DOWNLOAD_SDK} -e BRANCH=${BRANCH} -e COMMIT=${COMMIT} -e TAG=${TAG} -e CUSTOM=${CUSTOM}"
38+
DOCKER="${DOCKER} -e REL=${REL} -e HEAD_REPO_URL=${HEAD_REPO_URL} -e MKJOBS=${MKJOBS} -e TAR_VERSION=${TAR_VERSION} -e SDK_VERSION=${SDK_VERSION} -e ONLY_SDK=${ONLY_SDK} -e DOWNLOAD_SDK=${DOWNLOAD_SDK} -e BRANCH=${BRANCH} -e COMMIT=${COMMIT} -e TAG=${TAG} -e CUSTOM=${CUSTOM}"
3839
DOCKER="${DOCKER} -t --mount type=bind,source=${CWD}/distfiles,target=/mnt"
3940

4041
if [ ! -d "${CWD}/distfiles" ]; then

0 commit comments

Comments
 (0)