diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2023-10-25 19:47:33 -0700 |
|---|---|---|
| committer | TrainDoctor <traindoctor@protonmail.com> | 2023-10-25 19:47:33 -0700 |
| commit | a7669799bca3ff4089ab81fde924b2d2f787cf0f (patch) | |
| tree | 0afcb03ec1c01efac90be81674df649d6cef186e /.github | |
| parent | dacd2c19eb51ba525288fccb3ded653e45ca4409 (diff) | |
| download | decky-loader-a7669799bca3ff4089ab81fde924b2d2f787cf0f.tar.gz decky-loader-a7669799bca3ff4089ab81fde924b2d2f787cf0f.zip | |
Merge aa/type-cleanup-py (work by marios, aa, wolv)v2.10.6-pre1
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build-win.yml | 5 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 14 | ||||
| -rw-r--r-- | .github/workflows/typecheck.yml | 36 |
4 files changed, 55 insertions, 11 deletions
diff --git a/.github/workflows/build-win.yml b/.github/workflows/build-win.yml index 4b54bc12..118553ba 100644 --- a/.github/workflows/build-win.yml +++ b/.github/workflows/build-win.yml @@ -27,6 +27,7 @@ jobs: python-version: "3.11.4" - name: Install Python dependencies ⬇️ + working-directory: ./backend run: | python -m pip install --upgrade pip pip install pyinstaller==5.13.0 @@ -43,10 +44,10 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/legacy;/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py - name: Build Python Backend (noconsole) 🛠️ - run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/legacy;/legacy" --add-data "./plugin;/plugin" --hidden-import=sqlite3 ./backend/main.py + run: pyinstaller --noconfirm --noconsole --onefile --name "PluginLoader_noconsole" --add-data "./backend/static;/static" --add-data "./backend/locales;/locales" --add-data "./backend/src/legacy;/src/legacy" --add-data "./plugin/*;/" --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ uses: actions/upload-artifact@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe58eecb..a2b1e29f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,7 +62,7 @@ jobs: -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ -DSQLITE_MAX_EXPR_DEPTH=10000 -DSQLITE_ENABLE_MATH_FUNCTIONS" && - make && + make -j$(nproc) && sudo make install && sudo cp /usr/lib/libsqlite3.so /usr/lib/x86_64-linux-gnu/ && sudo cp /usr/lib/libsqlite3.so.0 /usr/lib/x86_64-linux-gnu/ && @@ -70,10 +70,11 @@ jobs: rm -r /tmp/sqlite-autoconf-3420000 - name: Install Python dependencies ⬇️ + working-directory: ./backend run: | python -m pip install --upgrade pip pip install pyinstaller==5.13.0 - [ -f requirements.txt ] && pip install -r requirements.txt + pip install -r requirements.txt - name: Install JS dependencies ⬇️ working-directory: ./frontend @@ -86,7 +87,7 @@ jobs: run: pnpm run build - name: Build Python Backend 🛠️ - run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/legacy:/legacy --add-data ./plugin:/plugin --hidden-import=sqlite3 ./backend/*.py + run: pyinstaller --noconfirm --onefile --name "PluginLoader" --add-data ./backend/static:/static --add-data ./backend/locales:/locales --add-data ./backend/src/legacy:/src/legacy --add-data ./plugin/*:/ --hidden-import=sqlite3 ./backend/main.py - name: Upload package artifact ⬆️ if: ${{ !env.ACT }} @@ -127,7 +128,7 @@ jobs: - name: Get latest release uses: rez0n/actions-github-release@main id: latest_release - env: + with: token: ${{ secrets.GITHUB_TOKEN }} repository: "SteamDeckHomebrew/decky-loader" type: "nodraft" @@ -206,7 +207,7 @@ jobs: - name: Get latest release uses: rez0n/actions-github-release@main id: latest_release - env: + with: token: ${{ secrets.GITHUB_TOKEN }} repository: "SteamDeckHomebrew/decky-loader" type: "nodraft" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1095f01b..b88fc242 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,6 +2,7 @@ name: Lint on: push: + pull_request: jobs: lint: @@ -10,8 +11,13 @@ jobs: steps: - uses: actions/checkout@v3 # Check out the repository first. - - name: Run prettier (JavaScript & TypeScript) + + - name: Install TypeScript dependencies + working-directory: frontend run: | - pushd frontend - npm install - npm run lint + npm i -g pnpm + pnpm i --frozen-lockfile + + - name: Run prettier (TypeScript) + working-directory: frontend + run: pnpm run lint
\ No newline at end of file diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 00000000..01a4bdff --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,36 @@ +name: Type Check + +on: + push: + pull_request: + +jobs: + typecheck: + name: Run type checkers + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 # Check out the repository first. + + - name: Install Python dependencies + working-directory: backend + run: | + python -m pip install --upgrade pip + [ -f requirements.txt ] && pip install -r requirements.txt + + - name: Install TypeScript dependencies + working-directory: frontend + run: | + npm i -g pnpm + pnpm i --frozen-lockfile + + - name: Run pyright (Python) + uses: jakebailey/pyright-action@v1 + with: + python-version: "3.10.6" + no-comments: true + working-directory: backend + + - name: Run tsc (TypeScript) + working-directory: frontend + run: $(pnpm bin)/tsc --noEmit
\ No newline at end of file |
