Mayo Takanashi
Potential fix for code scanning alert no. 1: Workflow does not contain permissions (#423)
4b0ec06 unverified | name: Build | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest, windows-latest, ubuntu-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install dependencies | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt update | |
| sudo apt install --no-install-recommends \ | |
| libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: Jimver/cuda-toolkit@master | |
| if: matrix.os == 'ubuntu-latest' | |
| with: | |
| cuda: '13.0.0' | |
| log-file-suffix: '${{ matrix.os }}.txt' | |
| - uses: Jimver/cuda-toolkit@master | |
| if: matrix.os == 'windows-latest' | |
| with: | |
| cuda: '13.0.0' | |
| method: 'network' | |
| sub-packages: '["nvcc", "cudart", "crt", "thrust", "nvvm", "cublas", "cublas_dev", "cufft", "cufft_dev", "curand", "curand_dev", "nvrtc", "nvrtc_dev"]' | |
| log-file-suffix: '${{ matrix.os }}.txt' | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| if: matrix.os == 'windows-latest' | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
| - run: bun install | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ${{ github.workspace }}/ui/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('ui/**/*.js', 'ui/**/*.jsx', 'ui/**/*.ts', 'ui/**/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lock') }}- | |
| - run: bun tauri build --no-bundle | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koharu-${{ matrix.os }} | |
| path: | | |
| target/release/koharu* | |
| retention-days: 3 | |