|  | 
| 34 | 34 |         with: | 
| 35 | 35 |           submodules: true | 
| 36 | 36 | 
 | 
|  | 37 | +      - name: Install rust | 
|  | 38 | +        uses: actions-rs/toolchain@v1 | 
|  | 39 | +        if: ${{ matrix.config.os == 'macOS-latest' }} | 
|  | 40 | +        with: | 
|  | 41 | +          toolchain: stable | 
|  | 42 | +          profile: minimal | 
|  | 43 | +          override: true | 
|  | 44 | +          target: aarch64-apple-darwin | 
|  | 45 | + | 
| 37 | 46 |       - name: Setup | Rust | 
|  | 47 | +        if: ${{ matrix.config.os == 'ubuntu-latest' }} | 
| 38 | 48 |         uses: ATiltedTree/setup-rust@v1 | 
| 39 | 49 |         with: | 
| 40 | 50 |           rust-version: "1.62.1" | 
|  | 
| 50 | 60 |             target/ | 
| 51 | 61 |           key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | 
| 52 | 62 | 
 | 
|  | 63 | +      - name: Install LLVM mac | 
|  | 64 | +        if: ${{ matrix.config.os == 'macOS-latest' }} | 
|  | 65 | +        run: | | 
|  | 66 | +          mkdir arm-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm-homebrew | 
|  | 67 | +          alias arm-brew='$(pwd)/arm-homebrew/bin/brew' | 
|  | 68 | +          response=$(./arm-homebrew/bin/brew fetch --force --bottle-tag=arm64_big_sur llvm@14 | grep "Downloaded to") | 
|  | 69 | +          parsed=($response) | 
|  | 70 | +          ./arm-homebrew/bin/brew install $parsed[3] | 
|  | 71 | +          echo "LLVM_SYS_140_PREFIX=$(./arm-homebrew/bin/brew --prefix llvm@14)" >> $GITHUB_ENV | 
| 53 | 72 |       - name: Install LLVM | 
|  | 73 | +        if: ${{ matrix.config.os == 'ubuntu-latest' }} | 
| 54 | 74 |         uses: Pivot-Studio/setup-llvm@main | 
| 55 | 75 | 
 | 
| 56 | 76 |       - name: set up win scoop | 
| @@ -83,17 +103,29 @@ jobs: | 
| 83 | 103 |         run: cargo build --release --verbose | 
| 84 | 104 | 
 | 
| 85 | 105 |       - name: Cargo build | 
| 86 |  | -        if: ${{ matrix.config.os != 'windows-latest' }} | 
|  | 106 | +        if: ${{ matrix.config.os == 'ubuntu-latest' }} | 
| 87 | 107 |         env: | 
| 88 | 108 |           RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} | 
| 89 | 109 |         run: cargo build --release | 
| 90 | 110 | 
 | 
| 91 |  | -      - name: Cargo build vm | 
| 92 |  | -        if: ${{ matrix.config.os != 'windows-latest' }} | 
|  | 111 | +      - name: Cargo build mac | 
|  | 112 | +        if: ${{ matrix.config.os == 'macOS-latest' }} | 
|  | 113 | +        env: | 
|  | 114 | +          RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} | 
|  | 115 | +        run: cargo build --release --target aarch64-apple-darwin | 
|  | 116 | + | 
|  | 117 | +      - name: Cargo build vm linux | 
|  | 118 | +        if: ${{ matrix.config.os == 'ubuntu-latest' }} | 
| 93 | 119 |         env: | 
| 94 | 120 |           RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} | 
| 95 | 121 |         run: cd vm && cargo build --release | 
| 96 | 122 | 
 | 
|  | 123 | +      - name: Cargo build vm mac arm64 | 
|  | 124 | +        if: ${{ matrix.config.os == 'macOS-latest' }} | 
|  | 125 | +        env: | 
|  | 126 | +          RUSTFLAGS: ${{ matrix.config.RUSTFLAGS }} | 
|  | 127 | +        run: cd vm && cargo build --release --target aarch64-apple-darwin | 
|  | 128 | + | 
| 97 | 129 |       - run: mkdir -p ${{ matrix.config.dir }} | 
| 98 | 130 | 
 | 
| 99 | 131 |       - name: Move artifacts | 
|  | 
0 commit comments