9 runs-on: ${{ matrix.os }}
18 # cross-compile from Linux to Windows using mingw
21 TARGET_TRIPLE: x86_64-pc-windows-gnu
24 TARGET_TRIPLE: aarch64-unknown-linux-gnu
27 - uses: actions/checkout@v2
29 - name: Cache cargo installed crates
30 uses: actions/cache@v2
33 key: ${{ runner.os }}-cargo-installed-crates
35 - name: Cache cargo registry and index
36 uses: actions/cache@v2
41 key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
43 - name: Cache cargo target dir
44 uses: actions/cache@v2
47 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
49 - name: Install MinGW toolchain and wine
50 if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
53 sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
54 rustup target add x86_64-pc-windows-gnu
56 - name: Install AArch64 toolchain and qemu
57 if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'aarch64-unknown-linux-gnu'
60 sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user
62 - name: Prepare dependencies
64 git config --global user.email "user@example.com"
65 git config --global user.name "User"
69 run: ./y.rs build --sysroot none
73 TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
75 # Enable backtraces for easier debugging
76 export RUST_BACKTRACE=1
78 # Reduce amount of benchmark runs as they are slow
83 export CG_CLIF_ENABLE_VERIFIER=1
87 - name: Package prebuilt cg_clif
88 run: tar cvfJ cg_clif.tar.xz build
90 - name: Upload prebuilt cg_clif
91 if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
92 uses: actions/upload-artifact@v2
94 name: cg_clif-${{ runner.os }}
97 - name: Upload prebuilt cg_clif (cross compile)
98 if: matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
99 uses: actions/upload-artifact@v2
101 name: cg_clif-${{ runner.os }}-cross-x86_64-mingw
105 runs-on: windows-latest
109 - uses: actions/checkout@v2
111 #- name: Cache cargo installed crates
112 # uses: actions/cache@v2
115 # key: ${{ runner.os }}-cargo-installed-crates
117 #- name: Cache cargo registry and index
118 # uses: actions/cache@v2
123 # key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
125 #- name: Cache cargo target dir
126 # uses: actions/cache@v2
129 # key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
131 - name: Prepare dependencies
133 git config --global user.email "user@example.com"
134 git config --global user.name "User"
135 git config --global core.autocrlf false
136 rustup set default-host x86_64-pc-windows-gnu
137 rustc y.rs -o y.exe -g
143 # Enable backtraces for easier debugging
144 #export RUST_BACKTRACE=1
146 # Reduce amount of benchmark runs as they are slow
147 #export COMPILE_RUNS=2
150 # Enable extra checks
151 #export CG_CLIF_ENABLE_VERIFIER=1
155 #- name: Package prebuilt cg_clif
156 # run: tar cvfJ cg_clif.tar.xz build
158 #- name: Upload prebuilt cg_clif
159 # uses: actions/upload-artifact@v2
161 # name: cg_clif-${{ runner.os }}
162 # path: cg_clif.tar.xz