Skip to content

Commit 5267096

Browse files
committed
Merge branch 'main' into map-absolute-mouse-to-pen
2 parents d1a6a88 + 25ab8c9 commit 5267096

File tree

1,079 files changed

+121006
-190151
lines changed

Some content is hidden

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

1,079 files changed

+121006
-190151
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: 'Setup Nonka N-Gage SDK'
2+
description: 'Download and setup Nokia N-Gage SDK'
3+
inputs:
4+
path:
5+
description: 'Installation path'
6+
default: 'default'
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.x'
13+
- name: 'Verify platform'
14+
id: calc
15+
shell: sh
16+
run: |
17+
case "${{ runner.os }}-${{ runner.arch }}" in
18+
"Windows-X86" | "Windows-X64")
19+
echo "ok!"
20+
echo "cache-key=ngage-sdk-windows" >> ${GITHUB_OUTPUT}
21+
default_install_path="C:/ngagesdk"
22+
;;
23+
*)
24+
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
25+
exit 1;
26+
;;
27+
esac
28+
install_path="${{ inputs.path }}"
29+
if [ "x$install_path" = "xdefault" ]; then
30+
install_path="$default_install_path"
31+
fi
32+
echo "install-path=$install_path" >> ${GITHUB_OUTPUT}
33+
34+
toolchain_repo="https://github.com/ngagesdk/ngage-toolchain"
35+
toolchain_branch="main"
36+
echo "toolchain-repo=${toolchain_repo}" >> ${GITHUB_OUTPUT}
37+
echo "toolchain-branch=${toolchain_branch}" >> ${GITHUB_OUTPUT}
38+
39+
sdk_repo="https://github.com/ngagesdk/sdk"
40+
sdk_branch="main"
41+
echo "sdk-repo=${sdk_repo}" >> ${GITHUB_OUTPUT}
42+
echo "sdk-branch=${sdk_branch}" >> ${GITHUB_OUTPUT}
43+
44+
tools_repo="https://github.com/ngagesdk/tools"
45+
tools_branch="main"
46+
echo "tools-repo=${tools_repo}" >> ${GITHUB_OUTPUT}
47+
echo "tools-branch=${tools_branch}" >> ${GITHUB_OUTPUT}
48+
49+
extras_repo="https://github.com/ngagesdk/extras"
50+
extras_branch="main"
51+
echo "extras-repo=${extras_repo}" >> ${GITHUB_OUTPUT}
52+
echo "extras-branch=${extras_branch}" >> ${GITHUB_OUTPUT}
53+
# - name: 'Restore cached ${{ steps.calc.outputs.archive }}'
54+
# id: cache-restore
55+
# uses: actions/cache/restore@v4
56+
# with:
57+
# path: '${{ runner.temp }}'
58+
# key: ${{ steps.calc.outputs.cache-key }}
59+
- name: 'Download N-Gage SDK'
60+
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
61+
shell: pwsh
62+
run: |
63+
64+
Invoke-WebRequest "${{ steps.calc.outputs.toolchain-repo }}/archive/refs/heads/${{ steps.calc.outputs.toolchain-branch }}.zip" -OutFile "${{ runner.temp }}/ngage-toolchain.zip"
65+
Invoke-WebRequest "${{ steps.calc.outputs.sdk-repo }}/archive/refs/heads/${{ steps.calc.outputs.sdk-branch }}.zip" -OutFile "${{ runner.temp }}/sdk.zip"
66+
Invoke-WebRequest "${{ steps.calc.outputs.tools-repo }}/archive/refs/heads/${{ steps.calc.outputs.tools-branch }}.zip" -OutFile "${{ runner.temp }}/tools.zip"
67+
Invoke-WebRequest "${{ steps.calc.outputs.extras-repo }}/archive/refs/heads/${{ steps.calc.outputs.extras-branch }}.zip" -OutFile "${{ runner.temp }}/extras.zip"
68+
69+
# - name: 'Cache ${{ steps.calc.outputs.archive }}'
70+
# if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
71+
# uses: actions/cache/save@v4
72+
# with:
73+
# path: |
74+
# ${{ runner.temp }}/apps.zip
75+
# ${{ runner.temp }}/sdk.zip
76+
# ${{ runner.temp }}/tools.zip
77+
# key: ${{ steps.calc.outputs.cache-key }}
78+
- name: 'Extract N-Gage SDK'
79+
shell: pwsh
80+
run: |
81+
New-Item -ItemType Directory -Path "${{ steps.calc.outputs.install-path }}" -Force
82+
83+
New-Item -ItemType Directory -Path "${{ runner.temp }}/ngage-toolchain-temp" -Force
84+
7z "-o${{ runner.temp }}/ngage-toolchain-temp" x "${{ runner.temp }}/ngage-toolchain.zip"
85+
Move-Item -Path "${{ runner.temp }}/ngage-toolchain-temp/ngage-toolchain-${{ steps.calc.outputs.toolchain-branch }}/*" -Destination "${{ steps.calc.outputs.install-path }}"
86+
87+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/sdk.zip"
88+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/sdk-${{ steps.calc.outputs.sdk-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/sdk"
89+
90+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/tools.zip"
91+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/tools-${{ steps.calc.outputs.tools-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/tools"
92+
93+
7z "-o${{ steps.calc.outputs.install-path }}/sdk" x "${{ runner.temp }}/extras.zip"
94+
Move-Item -Path "${{ steps.calc.outputs.install-path }}/sdk/extras-${{ steps.calc.outputs.extras-branch }}" -Destination "${{ steps.calc.outputs.install-path }}/sdk/extras"
95+
- name: 'Set output variables'
96+
id: final
97+
shell: sh
98+
run: |
99+
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/gcc/bin" >> $GITHUB_PATH
100+
echo "${{ steps.calc.outputs.install-path }}/sdk/sdk/6.1/Shared/EPOC32/ngagesdk/bin" >> $GITHUB_PATH
101+
echo "NGAGESDK=${{ steps.calc.outputs.install-path }}" >> $GITHUB_ENV
102+
echo "CMAKE_TOOLCHAIN_FILE=${{ steps.calc.outputs.install-path }}/cmake/ngage-toolchain.cmake" >> $GITHUB_ENV

0 commit comments

Comments
 (0)