From e45e0a7e769b58f07fbac15dcc4f510cdb6cf6f9 Mon Sep 17 00:00:00 2001 From: DarkSky Date: Sun, 20 Aug 2023 20:38:14 +0800 Subject: [PATCH] chore: cleanup --- .github/actions/build-rust/action.yml | 60 --------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/actions/build-rust/action.yml diff --git a/.github/actions/build-rust/action.yml b/.github/actions/build-rust/action.yml deleted file mode 100644 index c043aa2..0000000 --- a/.github/actions/build-rust/action.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "AFFiNE Rust build" -description: "Rust build setup, including cache configuration" -inputs: - target: - description: "Cargo target" - required: true - nx_token: - description: "Nx Cloud access token" - required: false - -runs: - using: "composite" - steps: - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - targets: ${{ inputs.target }} - - - name: Cache cargo - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - .cargo-cache - target/${{ inputs.target }} - key: stable-${{ inputs.target }}-cargo-cache - - name: Build - if: ${{ inputs.target != 'x86_64-unknown-linux-gnu' && inputs.target != 'aarch64-unknown-linux-gnu' }} - shell: bash - run: | - yarn nx build @affine/native --target ${{ inputs.target }} - env: - NX_CLOUD_ACCESS_TOKEN: ${{ inputs.nx_token }} - - - name: Build - if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' }} - uses: addnab/docker-run-action@v3 - with: - image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian - options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build -e NX_CLOUD_ACCESS_TOKEN=${{ inputs.nx_token }} - run: | - export CC=x86_64-unknown-linux-gnu-gcc - export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc - yarn nx build @affine/native --target ${{ inputs.target }} - chmod -R 777 node_modules/.cache - chmod -R 777 target - - - name: Build - if: ${{ inputs.target == 'aarch64-unknown-linux-gnu' }} - uses: addnab/docker-run-action@v3 - with: - image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 - options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build -e NX_CLOUD_ACCESS_TOKEN=${{ inputs.nx_token }} - run: | - yarn nx build @affine/native --target ${{ inputs.target }} - chmod -R 777 node_modules/.cache - chmod -R 777 target