|
| 1 | +name: Test Linux Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*.*.*-test' |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_INCREMENTAL: 0 |
| 13 | + RUST_BACKTRACE: short |
| 14 | + |
| 15 | +concurrency: |
| 16 | + group: '${{ github.workflow }}-${{ github.ref }}' |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + build-linux: |
| 21 | + name: Build Linux test package (x86_64) |
| 22 | + runs-on: ubuntu-22.04 |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + submodules: recursive |
| 27 | + |
| 28 | + - name: Install Rust |
| 29 | + uses: dtolnay/rust-toolchain@stable |
| 30 | + with: |
| 31 | + targets: x86_64-unknown-linux-gnu |
| 32 | + |
| 33 | + - name: Rust cache |
| 34 | + uses: Swatinem/rust-cache@v2 |
| 35 | + with: |
| 36 | + prefix-key: 'v1' |
| 37 | + key: 'ubuntu-22.04-x86_64-unknown-linux-gnu-test' |
| 38 | + workspaces: src-tauri -> target |
| 39 | + |
| 40 | + - name: Install Linux dependencies |
| 41 | + run: | |
| 42 | + sudo apt-get update |
| 43 | + sudo apt-get install -y \ |
| 44 | + libwebkit2gtk-4.1-dev \ |
| 45 | + libayatana-appindicator3-dev \ |
| 46 | + librsvg2-dev \ |
| 47 | + patchelf |
| 48 | +
|
| 49 | + - name: Install Protoc |
| 50 | + uses: arduino/setup-protoc@v3 |
| 51 | + with: |
| 52 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 53 | + |
| 54 | + - uses: actions/setup-node@v4 |
| 55 | + with: |
| 56 | + node-version: '20' |
| 57 | + |
| 58 | + - uses: pnpm/action-setup@v4 |
| 59 | + with: |
| 60 | + run_install: false |
| 61 | + |
| 62 | + - name: Get linked dependency versions |
| 63 | + id: dep-versions |
| 64 | + shell: bash |
| 65 | + run: | |
| 66 | + SM_SHA=$(git -C libs/stream-monaco rev-parse HEAD) |
| 67 | + MS_SHA=$(git -C libs/markstream-vue rev-parse HEAD) |
| 68 | + echo "cache-key=${{ runner.os }}-x86_64-unknown-linux-gnu-test-linked-deps-${SM_SHA:0:12}-${MS_SHA:0:12}" >> "$GITHUB_OUTPUT" |
| 69 | +
|
| 70 | + - name: Cache linked dependencies |
| 71 | + id: cache-linked-deps |
| 72 | + uses: actions/cache@v4 |
| 73 | + with: |
| 74 | + path: | |
| 75 | + libs/stream-monaco/node_modules |
| 76 | + libs/stream-monaco/dist |
| 77 | + libs/markstream-vue/node_modules |
| 78 | + libs/markstream-vue/packages/markdown-parser/node_modules |
| 79 | + libs/markstream-vue/packages/markdown-parser/dist |
| 80 | + libs/markstream-vue/packages/markstream-react/node_modules |
| 81 | + libs/markstream-vue/packages/markstream-react/dist |
| 82 | + key: ${{ steps.dep-versions.outputs.cache-key }} |
| 83 | + |
| 84 | + - name: Build linked dependencies |
| 85 | + if: steps.cache-linked-deps.outputs.cache-hit != 'true' |
| 86 | + run: | |
| 87 | + pnpm --dir libs/stream-monaco install --frozen-lockfile |
| 88 | + pnpm --dir libs/stream-monaco build |
| 89 | +
|
| 90 | + pnpm --dir libs/markstream-vue install --frozen-lockfile |
| 91 | + pnpm --dir libs/markstream-vue run build:parser |
| 92 | + pnpm --dir libs/markstream-vue/packages/markstream-react build |
| 93 | +
|
| 94 | + - name: Install frontend dependencies |
| 95 | + run: pnpm install --frozen-lockfile |
| 96 | + |
| 97 | + - name: Build Linux bundles |
| 98 | + run: pnpm tauri build --target x86_64-unknown-linux-gnu --bundles appimage,rpm,deb |
| 99 | + env: |
| 100 | + NODE_OPTIONS: '--max_old_space_size=4096' |
| 101 | + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} |
| 102 | + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} |
| 103 | + |
| 104 | + - name: Publish Linux test release |
| 105 | + uses: softprops/action-gh-release@v2 |
| 106 | + with: |
| 107 | + tag_name: ${{ github.ref_name }} |
| 108 | + name: 'AQBot ${{ github.ref_name }}' |
| 109 | + body: | |
| 110 | + Linux test build for issue #83 diagnostics. |
| 111 | +
|
| 112 | + If AQBot still opens as a blank window, start it with: |
| 113 | +
|
| 114 | + ```bash |
| 115 | + AQBOT_LOG_FILE="$HOME/aqbot-0.0.76.log" RUST_LOG=debug ./AQBot_0.0.76_amd64.AppImage |
| 116 | + ``` |
| 117 | +
|
| 118 | + For the RPM install: |
| 119 | +
|
| 120 | + ```bash |
| 121 | + AQBOT_LOG_FILE="$HOME/aqbot-0.0.76.log" RUST_LOG=debug AQBot |
| 122 | + ``` |
| 123 | +
|
| 124 | + Please attach the generated log file back to issue #83. |
| 125 | + draft: false |
| 126 | + prerelease: true |
| 127 | + make_latest: false |
| 128 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 129 | + files: | |
| 130 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage |
| 131 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.sig |
| 132 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm |
| 133 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm.sig |
| 134 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb |
| 135 | + src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb.sig |
0 commit comments