diff --git a/.github/scripts/PKGBUILD.source b/.github/scripts/PKGBUILD.source index ed19d54..4b14f5b 100644 --- a/.github/scripts/PKGBUILD.source +++ b/.github/scripts/PKGBUILD.source @@ -15,14 +15,23 @@ sha256sums=('$CI_SHA_SUM') # lto causes linking errors when executed by this buildscript. besides, lto is already done by cargo itself (which doesn't cause linking errors) options=(!lto) +prepare() { + cd "$srcdir/${pkgname}-$pkgver" + + export RUSTUP_TOOLCHAIN=stable + export CARGO_HOME="$srcdir/cargo-home" + + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + build() { cd "$srcdir/${pkgname}-$pkgver" - export CARGO_HOME="$srcdir/cargo-home" export RUSTUP_TOOLCHAIN=stable + export CARGO_HOME="$srcdir/cargo-home" export CRUNCHY_CLI_GIT_HASH=$CI_GIT_HASH - cargo build --release + cargo build --frozen --release } package() { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70f4400..5429d94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: run: cargo install --force cross - name: Build - run: cross build --release --no-default-features --features openssl-tls-static --target ${{ matrix.toolchain }} + run: cross build --locked --release --no-default-features --features openssl-tls-static --target ${{ matrix.toolchain }} - name: Upload binary artifact uses: actions/upload-artifact@v4 @@ -101,7 +101,7 @@ jobs: toolchain: stable - name: Build - run: cargo build --release --target ${{ matrix.toolchain }} + run: cargo build --locked --release --target ${{ matrix.toolchain }} - name: Upload binary artifact uses: actions/upload-artifact@v4 @@ -135,7 +135,7 @@ jobs: - name: Build shell: msys2 {0} - run: cargo build --release --target x86_64-pc-windows-gnu + run: cargo build --locked --release --target x86_64-pc-windows-gnu - name: Upload binary artifact uses: actions/upload-artifact@v4