name: Setup System and Rust description: Setup System and Rust inputs: token: description: GitHub token required: false default: '' target: description: Toolchain target triple required: false setup-arg: description: Argument for the system setup script required: false default: '' save-cache: description: Whether or not to save the system cache required: false default: 'false' runs: using: composite steps: - name: (macOS) Install bash@latest shell: bash if: ${{ runner.os == 'macOS' }} run: brew install bash - name: (Linux) Install mold@latest shell: bash if: ${{ runner.os == 'Linux' }} run: | curl -L# 'https://github.com/rui314/mold/releases/download/v2.33.0/mold-2.33.0-x86_64-linux.tar.gz' \ | sudo tar -xzf- -C /usr/local - name: (Linux) Cleanup Runner shell: bash if: ${{ runner.os == 'Linux' }} run: | set -eux if dpkg -l | grep i386; then sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386" || true sudo dpkg --remove-architecture i386 || true fi sudo apt-get remove libunwind-* || true - name: Setup Rust and Dependencies uses: ./.github/actions/setup-rust with: target: ${{ inputs.target }} save-cache: ${{ inputs.save-cache }} - name: (Linux/macOS) - Setup System shell: bash if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} run: ./packages/scripts/setup.sh ${{ inputs.setup-arg }} - name: (Windows) - Setup System if: ${{ runner.os == 'Windows' }} shell: powershell run: ./packages/scripts/setup.ps1 - name: Setup pnpm uses: ./.github/actions/setup-pnpm with: token: ${{ github.token }} - name: Setup Shared Libraries shell: bash env: TARGET_TRIPLE: ${{ inputs.triple }} GITHUB_TOKEN: ${{ inputs.token }} NODE_ENV: debug run: pnpm prep