Update iced to 0.13 and other deps too #85
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: Cargo Build | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: 'README.md' | |
pull_request: | |
branches: [ "main" ] | |
paths-ignore: 'README.md' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
name: Build Linux | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libasound2-dev libgtk-3-dev | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build --release --verbose | |
- name: Prepare directory to upload as an artifact | |
run: | | |
mkdir zip | |
mkdir zip/offline-chess-puzzles | |
cp -R pieces zip/offline-chess-puzzles/ | |
cp -R puzzles zip/offline-chess-puzzles/ | |
cp -R translations zip/offline-chess-puzzles/ | |
cp -R font zip/offline-chess-puzzles/ | |
cp .env zip/offline-chess-puzzles/ | |
cp ocp.db zip/offline-chess-puzzles/ | |
cp *.ogg zip/offline-chess-puzzles/ | |
cp settings.json zip/offline-chess-puzzles/ | |
cp LICENSE zip/offline-chess-puzzles/ | |
cp README.md zip/offline-chess-puzzles/ | |
cp target/release/offline-chess-puzzles zip/offline-chess-puzzles/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux-release-bin | |
path: zip/ | |
build-mac: | |
runs-on: macos-latest | |
name: Build mac | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo build --release --verbose | |
- name: Prepare directory to upload as an artifact | |
run: | | |
mkdir zip | |
mkdir zip/offline-chess-puzzles | |
cp -R pieces zip/offline-chess-puzzles/ | |
cp -R puzzles zip/offline-chess-puzzles/ | |
cp -R translations zip/offline-chess-puzzles/ | |
cp -R font zip/offline-chess-puzzles/ | |
cp .env zip/offline-chess-puzzles/ | |
cp ocp.db zip/offline-chess-puzzles/ | |
cp *.ogg zip/offline-chess-puzzles/ | |
cp settings.json zip/offline-chess-puzzles/ | |
cp LICENSE zip/offline-chess-puzzles/ | |
cp README.md zip/offline-chess-puzzles/ | |
cp target/release/offline-chess-puzzles zip/offline-chess-puzzles/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macos-release-bin | |
path: zip/ | |
build-windows-64: | |
runs-on: windows-latest | |
name: Build Windows 64-bit | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
rustup set auto-self-update disable | |
rustup toolchain install stable --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: Enable static CRT linkage | |
run: | | |
mkdir .cargo | |
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config | |
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config | |
- run: cargo build --release --verbose | |
- name: Prepare directory to upload as an artifact | |
run: | | |
mkdir zip | |
mkdir zip/offline-chess-puzzles | |
cp -R pieces zip/offline-chess-puzzles/ | |
cp -R puzzles zip/offline-chess-puzzles/ | |
cp -R translations zip/offline-chess-puzzles/ | |
cp -R font zip/offline-chess-puzzles/ | |
cp .env zip/offline-chess-puzzles/ | |
cp ocp.db zip/offline-chess-puzzles/ | |
cp *.ogg zip/offline-chess-puzzles/ | |
cp settings.json zip/offline-chess-puzzles/ | |
cp LICENSE zip/offline-chess-puzzles/ | |
cp README.md zip/offline-chess-puzzles/ | |
cp target/release/offline-chess-puzzles.exe zip/offline-chess-puzzles/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: windows-release | |
path: zip/ | |
build-windows-32: | |
runs-on: windows-latest | |
name: Build Windows 32-bit | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
rustup set auto-self-update disable | |
rustup toolchain install stable --profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
- name: Enable static CRT linkage | |
run: | | |
mkdir .cargo | |
echo '[target.i686-pc-windows-msvc]' >> .cargo/config | |
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config | |
- run: cargo build --release --target i686-pc-windows-msvc --verbose | |
- name: Prepare directory to upload as an artifact | |
run: | | |
mkdir zip | |
mkdir zip/offline-chess-puzzles | |
cp -R pieces zip/offline-chess-puzzles/ | |
cp -R puzzles zip/offline-chess-puzzles/ | |
cp -R translations zip/offline-chess-puzzles/ | |
cp -R font zip/offline-chess-puzzles/ | |
cp .env zip/offline-chess-puzzles/ | |
cp ocp.db zip/offline-chess-puzzles/ | |
cp *.ogg zip/offline-chess-puzzles/ | |
cp settings.json zip/offline-chess-puzzles/ | |
cp LICENSE zip/offline-chess-puzzles/ | |
cp README.md zip/offline-chess-puzzles/ | |
cp target/i686-pc-windows-msvc/release/offline-chess-puzzles.exe zip/offline-chess-puzzles/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: windows-release-i686 | |
path: zip/ | |