Skip to content

Commit 1f897f1

Browse files
committed
[feat] Add emsdk to thirdparty
1 parent c668adb commit 1f897f1

File tree

6,853 files changed

+1373389
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,853 files changed

+1373389
-0
lines changed

gameui/.Sys_Utils.cpp.swp

-20 KB
Binary file not shown.

thirdparty/emscripten-4.0.7-git/.circleci/config.yml

+1,142
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
Please include the following in your bug report:
10+
11+
**Version of emscripten/emsdk:**
12+
Please include the output `emcc -v` here
13+
14+
**Failing command line in full:**
15+
If this is compile or link-time failure please include the full failing command
16+
along with its entire output.
17+
18+
**Full link command and output with `-v` appended:**
19+
Even for runtime issues it helps a lot if you can include the full link command.
20+
Adding `-v` to the link command will show all of the sub-commands run which
21+
can help us diagnose your issue.
22+
23+
Note: Where possible, please avoid attaching screen shots of code or console
24+
logs. Instead, please include them as text so that they may be copied /
25+
searched. To make code blocks more readable and syntax highlighted, please
26+
escape them with three backticks before and after, like this:
27+
28+
```cpp
29+
int x = 20;
30+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm"
9+
directory: "/" # Look for `package.json` and `lock` files in the `root` directory
10+
schedule:
11+
interval: "monthly"
12+
commit-message:
13+
prefix: "[deps]"
14+
groups:
15+
production-dependencies:
16+
dependency-type: "production"
17+
development-dependencies:
18+
dependency-type: "development"
19+
20+
- package-ecosystem: "github-actions"
21+
directory: "/" # Location of package manifests
22+
schedule:
23+
interval: "monthly"
24+
commit-message:
25+
prefix: "[deps]"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 365
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 30
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because there has been no
14+
activity in the past year. It will be closed automatically if no further
15+
activity occurs in the next 30 days. Feel free to re-open at any time if this
16+
issue is still relevant.
17+
# Comment to post when closing a stale issue. Set to `false` to disable
18+
closeComment: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
create:
5+
tags:
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
archive:
16+
name: Archive
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
20+
- name: make dist
21+
run: |
22+
make dist
23+
version=`cat emscripten-version.txt | sed s/\"//g`
24+
echo "VERSION=$version" >> $GITHUB_ENV
25+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.5
26+
with:
27+
name: emscripten-${{ env.VERSION }}
28+
path: emscripten-${{ env.VERSION }}.tar.bz2
29+
30+
check-expectations:
31+
name: Check Expectations
32+
runs-on: ubuntu-latest
33+
if: github.event_name == 'pull_request'
34+
steps:
35+
- name: Checkout repo
36+
uses: actions/checkout@v4
37+
with:
38+
submodules: true
39+
fetch-depth: 0 # We want access to other branches, specifically `main`
40+
- name: pip install
41+
run: |
42+
which python3
43+
python3 --version
44+
python3 -m pip install -r requirements-dev.txt
45+
- name: Install emsdk
46+
run: |
47+
EM_CONFIG=$HOME/emsdk/.emscripten
48+
echo $EM_CONFIG
49+
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
50+
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
51+
tar -C ~ -xf ~/emsdk-main.tar.gz
52+
mv ~/emsdk-main ~/emsdk
53+
cd ~/emsdk
54+
./emsdk install tot
55+
./emsdk activate tot
56+
echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG
57+
echo "final config:"
58+
cat $EM_CONFIG
59+
- name: Check test expectations on target branch
60+
run: |
61+
echo "Checking out ${{ github.base_ref }}"
62+
git checkout ${{ github.base_ref }}
63+
git rev-parse HEAD
64+
# Hack to honor changes to rebaseline_tests.py in the current PR
65+
git checkout - ./tools/maint/rebaseline_tests.py
66+
./bootstrap
67+
if ! ./tools/maint/rebaseline_tests.py --check-only; then
68+
echo "Test expectations are out-of-date on the target branch."
69+
echo "You can run './tools/maint/rebaseline_tests.py --new-branch'"
70+
echo "and use it to create a seperate PR."
71+
echo "-- This failure is only a warning and can be ignored"
72+
exit 1
73+
fi
74+
- name: Check test expectations on PR branch
75+
run: |
76+
echo "Checking out ${{ github.ref }} (${{ github.sha }})"
77+
# For some reason we cannot pass ${{ github.ref }} direclty to git
78+
# since it doesn't recognise it.
79+
git checkout ${{ github.sha }}
80+
git rev-parse HEAD
81+
./bootstrap
82+
if ! ./tools/maint/rebaseline_tests.py --check-only --clear-cache; then
83+
echo "Test expectations are out-of-date on the PR branch."
84+
echo "You can run './tools/maint/rebaseline_tests.py' to"
85+
echo "create a commit updating the expectations."
86+
echo "Be sure to have `emsdk install tot` first."
87+
echo "-- This failure is only a warning and can be ignored"
88+
exit 1
89+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Rebaseline Tests
2+
3+
on:
4+
workflow_dispatch:
5+
# Trigger every day at 3.30 AM PST (= 10:30 AM UTC)
6+
schedule:
7+
- cron: "30 10 * * *"
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
rebaseline-tests:
15+
name: Rebaseline Tests
16+
runs-on: ubuntu-latest
17+
env:
18+
GH_TOKEN: ${{ github.token }}
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
submodules: true
25+
- name: pip install
26+
run: |
27+
which python3
28+
python3 --version
29+
python3 -m pip install -r requirements-dev.txt
30+
- name: Install emsdk
31+
run: |
32+
EM_CONFIG=$HOME/emsdk/.emscripten
33+
echo $EM_CONFIG
34+
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
35+
tar -C ~ -xf ~/emsdk-main.tar.gz
36+
mv ~/emsdk-main ~/emsdk
37+
cd ~/emsdk
38+
./emsdk install tot
39+
./emsdk activate tot
40+
echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG
41+
echo "final config:"
42+
cat $EM_CONFIG
43+
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
44+
- name: Rebaseline tests
45+
run: |
46+
git config user.name emscripten-bot
47+
git config user.email emscripten-bot@users.noreply.github.com
48+
./bootstrap
49+
if ./tools/maint/rebaseline_tests.py --new-branch; then
50+
echo "rebaseline_tests returned zero, expectations up-to-date"
51+
# Exit early and don't create a PR
52+
exit 0
53+
else
54+
code=$?
55+
if [[ $code != 2 ]] ; then
56+
echo "rebaseline_tests.py failed with unexpected error $code (expected 2)"
57+
exit 1
58+
fi
59+
fi
60+
git push origin rebaseline_tests
61+
gh pr create --fill --base ${{ github.ref_name }}
62+
gh pr merge --squash --auto
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Scorecards supply-chain security
2+
on:
3+
# Only the default branch is supported.
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '44 18 * * 3'
7+
push:
8+
branches: [ main ]
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard.
19+
security-events: write
20+
actions: read
21+
contents: read
22+
# Needed to publish results
23+
id-token: write
24+
25+
steps:
26+
- name: "Checkout code"
27+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
28+
with:
29+
persist-credentials: false
30+
31+
- name: "Run analysis"
32+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
33+
with:
34+
results_file: results.sarif
35+
results_format: sarif
36+
# Read-only PAT token. To create it,
37+
# follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
38+
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
39+
# Publish the results to enable scorecard badges. For more details, see
40+
# https://github.com/ossf/scorecard-action#publishing-results.
41+
# For private repositories, `publish_results` will automatically be set to `false`,
42+
# regardless of the value entered here.
43+
publish_results: true
44+
45+
# Upload the results as artifacts (optional).
46+
- name: "Upload artifact"
47+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
48+
with:
49+
name: SARIF file
50+
path: results.sarif
51+
retention-days: 5
52+
53+
# Upload the results to GitHub's code scanning dashboard.
54+
- name: "Upload to code-scanning"
55+
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
56+
with:
57+
sarif_file: results.sarif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Tag release and update changelog
2+
name: Tag release and update Changelog
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
release-sha:
8+
required: true
9+
type: string
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
17+
# Updates changelog and writes the release version into the environment
18+
- name: Update Changelog
19+
run: python3 tools/maint/create_release.py --action
20+
- name: Create Changelog PR
21+
id: cpr
22+
uses: peter-evans/create-pull-request@v6
23+
with:
24+
token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
25+
title: Mark ${{ env.RELEASE_VERSION }} as released
26+
body: Update changelog and emscripten-version.txt [ci skip]
27+
team-reviewers: release-reviewers
28+
branch: release_${{ env.RELEASE_VERSION }}
29+
delete-branch: true
30+
- name: Enable auto-merge
31+
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
32+
env:
33+
GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
34+
- name: Tag release sha
35+
uses: actions/github-script@v7
36+
with:
37+
github-token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
38+
script: |
39+
const tag_sha = '${{ inputs.release-sha }}';
40+
const release_version = '${{ env.RELEASE_VERSION }}';
41+
console.log(`Version ${release_version} at SHA ${tag_sha}`);
42+
const regex = /^[0-9]+.[0-9]+.[0-9]+$/;
43+
const match = release_version.match(regex);
44+
if (!match) {
45+
throw new Error('Malformed release version');
46+
}
47+
await github.rest.git.createRef({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
ref: `refs/tags/${release_version}`,
51+
sha: tag_sha
52+
});
53+

0 commit comments

Comments
 (0)