build #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: workflow_dispatch | |
env: | |
CARGO_BUILD_TARGET: i686-win7-windows-msvc | |
PROFILE: release | |
jobs: | |
build: | |
name: build | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly-2024-04-15 | |
components: rust-src | |
- run: | | |
$Env:RUSTFLAGS = "-Ctarget-feature=+crt-static" | |
cargo build --profile ${{env.PROFILE}} --config profile.release.debug=true --config 'profile.release.split-debuginfo="packed"' --config 'profile.release.strip="none"' -Z build-std | |
- run: | | |
cp giuroll.ini target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/ | |
cp LICENSE target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/LICENSE.txt | |
echo [InternetShortcut] > source-code-and-the-build.url | |
# https://stackoverflow.com/a/70566764 | |
echo URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} >> source-code-and-the-build.url | |
cp source-code-and-the-build.url target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/ | |
$verstr = cargo run --example print-version --profile ${{env.PROFILE}} --config profile.release.debug=true --config 'profile.release.split-debuginfo="packed"' --config 'profile.release.strip="none"' -Z build-std | |
$commit_id = git rev-parse --short HEAD | |
echo VERSION=${verstr}_${commit_id} >> $env:GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: giuroll-${{ env.VERSION }} | |
path: | | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.dll | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.ini | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/LICENSE.txt | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/source-code-and-the-build.url | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: giuroll-pdb-${{ env.VERSION }} | |
path: | | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.pdb | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/LICENSE.txt | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/source-code-and-the-build.url | |
- run: | | |
$Env:RUSTFLAGS = "-Ctarget-feature=+crt-static" | |
cargo build --profile ${{env.PROFILE}} --config profile.release.debug=true --config 'profile.release.split-debuginfo="packed"' --config 'profile.release.strip="none"' -Z build-std --features fillfree | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: giuroll-fillfree-${{ env.VERSION }} | |
path: | | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.dll | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.ini | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/LICENSE.txt | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/source-code-and-the-build.url | |
target/${{ env.CARGO_BUILD_TARGET }}/${{ env.PROFILE }}/giuroll.pdb |