From c187ac12012602d7ae3eb5123413ff59e2732d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=90=91=E5=A4=9C?= <46275354+fu050409@users.noreply.github.com> Date: Thu, 11 Jul 2024 23:09:37 -0400 Subject: [PATCH] ci(build): setup build ci (#5) * ci(build): setup build ci * fix(ci): remove cli args for build * fix(ci): install dependencies on ubuntu * fix(deps): bump `vue-tsc` to v2 (#7) * chore(deps): update lock file * ci(build): add `librust-gdk-sys-dev` * ci(build): try use official command * ci(build): add `libjavascriptcoregtk-6.0-dev` * ci(build): use js v4.1 instead * ci(build): add `libsoup-3.0-dev` * ci: use v4.1 --- .github/PULL_REQUEST_TEMPLATE.md | 19 +++++++ .github/workflows/build.yml | 68 ++++++++++++++++++++++++ package.json | 2 +- pnpm-lock.yaml | 89 +++++++++++++++++--------------- 4 files changed, 134 insertions(+), 44 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/build.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..c7a8e72 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +# + +Resolved: + +## What's being changed? + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c8a1c8a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,68 @@ +name: Build Grassator + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build on ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + + runs-on: ${{ matrix.platform }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false + + - name: Setup Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + + - name: Setup Rust Toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Install dependencies + run: pnpm install + + - name: Install Tauri Linux Dependencies + if: matrix.platform == 'ubuntu-latest' + run: >- + sudo apt-get update && + sudo apt-get install -y + libgtk-3-dev + libayatana-appindicator3-dev + libwebkit2gtk-4.1-dev + webkit2gtk-driver + xvfb + libjavascriptcoregtk-4.1-dev + libsoup-3.0-dev + + - name: Build + run: pnpm tauri build diff --git a/package.json b/package.json index 3c0f925..7b6c57d 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,6 @@ "internal-ip": "^7.0.0", "typescript": "^5.5.3", "vite": "^5.3.3", - "vue-tsc": "^1.8.27" + "vue-tsc": "^2.0.26" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6190def..e23e442 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,26 +34,26 @@ importers: specifier: ^5.3.3 version: 5.3.3 vue-tsc: - specifier: ^1.8.27 - version: 1.8.27(typescript@5.5.3) + specifier: ^2.0.26 + version: 2.0.26(typescript@5.5.3) packages: - '@babel/helper-string-parser@7.24.7': - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.7': - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + '@babel/parser@7.24.8': + resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/types@7.24.7': - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + '@babel/types@7.24.8': + resolution: {integrity: sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==} engines: {node: '>=6.9.0'} '@esbuild/aix-ppc64@0.21.5': @@ -372,14 +372,14 @@ packages: vite: ^5.0.0 vue: ^3.2.25 - '@volar/language-core@1.11.1': - resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==} + '@volar/language-core@2.4.0-alpha.15': + resolution: {integrity: sha512-mt8z4Fm2WxfQYoQHPcKVjLQV6PgPqyKLbkCVY2cr5RSaamqCHjhKEpsFX66aL4D/7oYguuaUw9Bx03Vt0TpIIA==} - '@volar/source-map@1.11.1': - resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==} + '@volar/source-map@2.4.0-alpha.15': + resolution: {integrity: sha512-8Htngw5TmBY4L3ClDqBGyfLhsB8EmoEXUH1xydyEtEoK0O6NX5ur4Jw8jgvscTlwzizyl/wsN1vn0cQXVbbXYg==} - '@volar/typescript@1.11.1': - resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==} + '@volar/typescript@2.4.0-alpha.15': + resolution: {integrity: sha512-U3StRBbDuxV6Woa4hvGS4kz3XcOzrWUKgFdEFN+ba1x3eaYg7+ytau8ul05xgA+UNGLXXsKur7fTUhDFyISk0w==} '@vue/compiler-core@3.4.31': resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} @@ -393,8 +393,8 @@ packages: '@vue/compiler-ssr@3.4.31': resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==} - '@vue/language-core@1.8.27': - resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + '@vue/language-core@2.0.26': + resolution: {integrity: sha512-/lt6SfQ3O1yDAhPsnLv9iSUgXd1dMHqUm/t3RctfqjuwQf1LnftZ414X3UBn6aXT4MiwXWtbNJ4Z0NZWwDWgJQ==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -511,8 +511,8 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - muggle-string@0.3.1: - resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==} + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} @@ -619,14 +619,17 @@ packages: terser: optional: true + vscode-uri@3.0.8: + resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + vue-template-compiler@2.7.16: resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} - vue-tsc@1.8.27: - resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} + vue-tsc@2.0.26: + resolution: {integrity: sha512-tOhuwy2bIXbMhz82ef37qeiaQHMXKQkD6mOF6CCPl3/uYtST3l6fdNyfMxipudrQTxTfXVPlgJdMENBFfC1CfQ==} hasBin: true peerDependencies: - typescript: '*' + typescript: '>=5.0.0' vue@3.4.31: resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==} @@ -643,17 +646,17 @@ packages: snapshots: - '@babel/helper-string-parser@7.24.7': {} + '@babel/helper-string-parser@7.24.8': {} '@babel/helper-validator-identifier@7.24.7': {} - '@babel/parser@7.24.7': + '@babel/parser@7.24.8': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.24.8 - '@babel/types@7.24.7': + '@babel/types@7.24.8': dependencies: - '@babel/helper-string-parser': 7.24.7 + '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 @@ -832,22 +835,21 @@ snapshots: vite: 5.3.3 vue: 3.4.31(typescript@5.5.3) - '@volar/language-core@1.11.1': + '@volar/language-core@2.4.0-alpha.15': dependencies: - '@volar/source-map': 1.11.1 + '@volar/source-map': 2.4.0-alpha.15 - '@volar/source-map@1.11.1': - dependencies: - muggle-string: 0.3.1 + '@volar/source-map@2.4.0-alpha.15': {} - '@volar/typescript@1.11.1': + '@volar/typescript@2.4.0-alpha.15': dependencies: - '@volar/language-core': 1.11.1 + '@volar/language-core': 2.4.0-alpha.15 path-browserify: 1.0.1 + vscode-uri: 3.0.8 '@vue/compiler-core@3.4.31': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.24.8 '@vue/shared': 3.4.31 entities: 4.5.0 estree-walker: 2.0.2 @@ -860,7 +862,7 @@ snapshots: '@vue/compiler-sfc@3.4.31': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.24.8 '@vue/compiler-core': 3.4.31 '@vue/compiler-dom': 3.4.31 '@vue/compiler-ssr': 3.4.31 @@ -875,15 +877,14 @@ snapshots: '@vue/compiler-dom': 3.4.31 '@vue/shared': 3.4.31 - '@vue/language-core@1.8.27(typescript@5.5.3)': + '@vue/language-core@2.0.26(typescript@5.5.3)': dependencies: - '@volar/language-core': 1.11.1 - '@volar/source-map': 1.11.1 + '@volar/language-core': 2.4.0-alpha.15 '@vue/compiler-dom': 3.4.31 '@vue/shared': 3.4.31 computeds: 0.0.1 minimatch: 9.0.5 - muggle-string: 0.3.1 + muggle-string: 0.4.1 path-browserify: 1.0.1 vue-template-compiler: 2.7.16 optionalDependencies: @@ -1017,7 +1018,7 @@ snapshots: dependencies: brace-expansion: 2.0.1 - muggle-string@0.3.1: {} + muggle-string@0.4.1: {} nanoid@3.3.7: {} @@ -1099,15 +1100,17 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + vscode-uri@3.0.8: {} + vue-template-compiler@2.7.16: dependencies: de-indent: 1.0.2 he: 1.2.0 - vue-tsc@1.8.27(typescript@5.5.3): + vue-tsc@2.0.26(typescript@5.5.3): dependencies: - '@volar/typescript': 1.11.1 - '@vue/language-core': 1.8.27(typescript@5.5.3) + '@volar/typescript': 2.4.0-alpha.15 + '@vue/language-core': 2.0.26(typescript@5.5.3) semver: 7.6.2 typescript: 5.5.3