9 runs-on: ${{ matrix.os }}
18 # cross-compile from Linux to Windows using mingw
21 TARGET_TRIPLE: x86_64-pc-windows-gnu
24 - uses: actions/checkout@v2
26 - name: Cache cargo installed crates
27 uses: actions/cache@v2
30 key: ${{ runner.os }}-cargo-installed-crates
32 - name: Cache cargo registry and index
33 uses: actions/cache@v2
38 key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
40 - name: Cache cargo target dir
41 uses: actions/cache@v2
44 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
46 - name: Install MinGW toolchain and wine
47 if: matrix.os == 'ubuntu-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-pc-windows-gnu'
49 sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
50 rustup target add x86_64-pc-windows-gnu
52 - name: Prepare dependencies
54 git config --global user.email "user@example.com"
55 git config --global user.name "User"
60 TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
62 # Enable backtraces for easier debugging
63 export RUST_BACKTRACE=1
65 # Reduce amount of benchmark runs as they are slow
70 export CG_CLIF_ENABLE_VERIFIER=1
74 - name: Package prebuilt cg_clif
75 run: tar cvfJ cg_clif.tar.xz build
77 - name: Upload prebuilt cg_clif
78 if: matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
79 uses: actions/upload-artifact@v2
81 name: cg_clif-${{ runner.os }}