Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b535637
Revert "automated duplicating imported samples modifications (#595)"
robGG1997 Sep 14, 2023
95fb832
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
e3ab3c2
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 14, 2023
a536df0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 15, 2023
c12a0de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
8e1ea0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 18, 2023
1318cd7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 21, 2023
33b8e52
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 22, 2023
0a205bd
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 25, 2023
df4795a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
abc34f6
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Sep 29, 2023
031e8d3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 18, 2023
3a4bdd9
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 24, 2023
67d871d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 25, 2023
3c1d099
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 30, 2023
ed22cb7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Oct 31, 2023
4c8b282
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 1, 2023
ea609de
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
adcb974
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 2, 2023
77dd93a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 3, 2023
12af139
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 7, 2023
3080de3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
87a1dcc
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 8, 2023
f25d202
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 9, 2023
300d906
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 14, 2023
f28d9f4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 16, 2023
ab26fa3
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
c5c0cb4
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 17, 2023
a1671d7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 20, 2023
a4755d1
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
6ca4ea7
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 21, 2023
07cee0a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 22, 2023
f2bb351
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
b064568
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
02606c0
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 23, 2023
6644661
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Nov 27, 2023
93e8fbe
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 6, 2023
5881543
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 7, 2023
a2cdc0e
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
9765f8d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 11, 2023
fc7269a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 12, 2023
0fe7628
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 12, 2023
bba537e
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 13, 2023
9930e97
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 13, 2023
1f1d439
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 14, 2023
da2418a
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Dec 15, 2023
8a5be99
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Jan 18, 2024
cea3e2b
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Jan 18, 2024
718bf99
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Jan 29, 2024
89f11bf
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Jan 30, 2024
916dca1
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Feb 1, 2024
a9a20bc
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Feb 7, 2024
cd514db
made main package testable, revert due to a mistake
robGG1997 Feb 7, 2024
3428344
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Feb 8, 2024
d2e7533
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Feb 8, 2024
7acb12d
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Mar 11, 2024
b6337a6
Merge branch 'main' of https://github.com/ChainSafe/web3.unity
robGG1997 Apr 1, 2024
e25b7ca
checkpoint
robGG1997 Apr 1, 2024
6aa815b
ignored samples
robGG1997 Apr 1, 2024
c00d0ca
Make commits on push to dev and checks on PR to main and dev
robGG1997 Apr 1, 2024
9ad7fdb
test 1
robGG1997 Apr 1, 2024
a032ee3
unity tests and push refactored into jobs instead of steps
robGG1997 Apr 1, 2024
38995c8
removed unity tests from check and commit
robGG1997 Apr 1, 2024
3daa183
reverted libraries delete
robGG1997 Apr 2, 2024
9da324a
test commit message
robGG1997 Apr 2, 2024
935d391
test commit message 2
robGG1997 Apr 2, 2024
19e2dc3
test commit message 3
robGG1997 Apr 2, 2024
d33988f
added tests and workflow call usage
robGG1997 Apr 2, 2024
0dc52c4
unity tests run on workflow call now
robGG1997 Apr 2, 2024
2de061f
switched test branch to dev
robGG1997 Apr 2, 2024
0d4dca1
Edited CONTRIBUTION.md to reflect flow changes
robGG1997 Apr 2, 2024
2656ff3
some syntax changes
robGG1997 Apr 2, 2024
ce61fd3
small syntax fix
robGG1997 Apr 2, 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
134 changes: 134 additions & 0 deletions .github/workflows/check_and_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: Check and Commit

on:
workflow_call:

jobs:
duplicate_samples_and_publish_dependencies:
name: Duplicate Samples And Publish Dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- src/UnitySampleProject
testMode:
- PlayMode
- EditMode
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Configure Git
run: |
git config user.email $git_email
git config user.name "${{ github.actor }}"
env:
git_email: "${{ github.actor }}@users.noreply.github.com"
- name: Duplicate Web3 Unity Samples
run: |
export SOURCE_PATH=
export DESTINATION_DIRECTORY=
export DESTINATION_PATH=

export DUPLICATE_SAMPLE_VARS=${{ vars.DUPLICATE_SAMPLE_VARS }}

for entry in "${DUPLICATE_SAMPLE_VARS[@]}"
do
IFS=':' read -ra dirs <<< "$entry"
SOURCE_PATH=${dirs[0]}
DESTINATION_DIRECTORY=${dirs[1]}

SOURCE_PATH="${GITHUB_WORKSPACE}/$SOURCE_PATH/$(ls "$SOURCE_PATH" | head -n 1)/$DESTINATION_DIRECTORY"

DESTINATION_PATH="${GITHUB_WORKSPACE}/${dirs[2]}"

rm -rf "$DESTINATION_PATH"
mkdir -p "$DESTINATION_PATH"
cp -r "$SOURCE_PATH/." "$DESTINATION_PATH"

git add "$DESTINATION_PATH." -f
done
- name: update submodules
# clone submodules
run: |
git submodule update --init
shell: bash
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Publish Solution DLLs
run: |
dotnet publish src/ChainSafe.Gaming.Unity/ChainSafe.Gaming.Unity.csproj -c Release /property:Unity=true
- name: Move DLLs to Unity Packages
run: |

export PUBLISH_PATH="${GITHUB_WORKSPACE}/${{ vars.PUBLISH_PATH }}"

echo -e "DLLs Generated\n$(ls "$PUBLISH_PATH")"

export PACKAGE_DEPENDENCIES=($(<${GITHUB_WORKSPACE}/scripts/data/published_dependencies.txt))

PACKAGE_DEPENDENCIES="${PACKAGE_DEPENDENCIES//$'\n'/ }"
PACKAGE_DEPENDENCIES="${PACKAGE_DEPENDENCIES//$'\r'/}"

export DLL_META_FILE_TEMPLATE="${{ vars.DLL_META_FILE_TEMPLATE }}"

for entry in "${PACKAGE_DEPENDENCIES[@]}"
do
IFS=':' read -ra dirs <<< "$entry"
export PACKAGE_LIB_PATH="${GITHUB_WORKSPACE}/${dirs[0]}"

if [ -d "$PACKAGE_LIB_PATH" ]; then
rm "$PACKAGE_LIB_PATH"*.dll
else
mkdir -p "$PACKAGE_LIB_PATH"
fi

IFS=';' read -ra dependencies <<< "${dirs[1]}"

for dependency in "${dependencies[@]}"
do
cp "$PUBLISH_PATH/$dependency.dll" $PACKAGE_LIB_PATH
if ! [ -f "$PACKAGE_LIB_PATH$dependency.dll.meta" ]; then
echo -e "${DLL_META_FILE_TEMPLATE/"[[assetGuid]]"/"$(uuidgen | tr -d '-')"}" >> "$PACKAGE_LIB_PATH$dependency.dll.meta"
fi
done

git add "$PACKAGE_LIB_PATH." -f
done
- uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}
restore-keys: |
Library-
- uses: game-ci/unity-test-runner@v3
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: ${{ matrix.projectPath }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ matrix.testMode }} Test Results
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;'
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.artifactsPath }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results for ${{ matrix.testMode }}
path: ${{ steps.tests.outputs.coveragePath }}
- name: Commit and Push changes
if: ${{ github.ref_name == 'dev' }}
run: |
git diff-index --cached --quiet HEAD || git commit -m 'Auto Commit
- Duplicate Packages Samples
- Publish DLL Dependencies'
git push
45 changes: 0 additions & 45 deletions .github/workflows/duplicate_samples.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/post_push_checks_and_commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Post Push Checks and Commits

on:
push:
branches: [ dev ]

jobs:
check_and_commit:
name: Check and Commit
uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yaml@main
secrets: inherit
14 changes: 0 additions & 14 deletions .github/workflows/pre_pull_request_auto_commits.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/pre_pull_request_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Merge Checks

on:
pull_request:
branches: [ main ]
branches:
- main
- dev
types:
- labeled
- ready_for_review
Expand All @@ -12,12 +14,13 @@ jobs:
name: Web3 Tests
if: ${{ github.event.action == 'ready_for_review' || github.event.label.name == 'ready-to-merge'}}
uses: ChainSafe/web3.unity/.github/workflows/test.yaml@main
unity_tests:
name: Unity Tests
uses: ChainSafe/web3.unity/.github/workflows/unity_tests.yml@main
needs: [web3_tests]
secrets: inherit
analyze_code:
name: Analyze Code
uses: ChainSafe/web3.unity/.github/workflows/codeql.yml@main
needs: [unity_tests]
needs: [ web3_tests ]
unity_tests:
name: Unity Tests
if: ${{ github.event.pull_request.head.ref == 'main' }}
uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yml@main
needs: [ analyze_code ]
secrets: inherit
72 changes: 0 additions & 72 deletions .github/workflows/publish_dependencies.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/unity_tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If you're unsure how you would actually extend Chainsafe's SDK, take a look at t
4. **Write Tests**: Write unit tests for your code and ensure that all existing tests pass.
5. **Commit Changes**: Commit your changes with a descriptive commit message using `git commit -m "Add feature X"`.
6. **Push to Your Fork**: Push your changes to your forked repository with `git push origin my-contribution`.
7. **Submit a Pull Request**: Finally, submit a pull request to the main web3.unity repository.
7. **Submit a Pull Request**: Finally, submit a pull request targeting the `dev` branch of web3.unity repository.
## Reporting Issues
Expand Down
5 changes: 5 additions & 0 deletions Packages/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ crashlytics-build.properties
/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/*.pdb
/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/*.pdb.meta

/io.chainsafe.web3-unity/Samples~/*
/io.chainsafe.web3-unity.lootboxes/Samples~/*
/io.chainsafe.web3-unity.ramp/Samples~/*
/io.chainsafe.web3-unity.web3auth/Samples~/*

# Since the folder is called 'Debug', it's being ignored, so negate that
!/io.chainsafe.web3-unity.web3auth/Runtime/Plugins/Web3AuthSDK/Debug