name: Build on: push: branches: - master jobs: todos_linux: runs-on: ubuntu-latest steps: - uses: hecrj/setup-rust-action@v1 - name: Install cargo-deb run: cargo install cargo-deb - uses: actions/checkout@master - name: Install dependencies run: | export DEBIAN_FRONTED=noninteractive sudo apt-get -qq update sudo apt-get install -y libxkbcommon-dev - name: Enable Link Time Optimizations run: | echo "[profile.release]" >> Cargo.toml echo "lto = true" >> Cargo.toml - name: Build todos binary run: cargo build --verbose --release --package todos - name: Archive todos binary uses: actions/upload-artifact@v1 with: name: todos-x86_64-unknown-linux-gnu path: target/release/todos - name: Pack todos .deb package run: cargo deb --no-build --package todos - name: Rename todos .deb package run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb - name: Archive todos .deb package uses: actions/upload-artifact@v1 with: name: todos-x86_64-debian-linux-gnu path: target/debian/iced_todos-x86_64-debian-linux-gnu.deb todos_windows: runs-on: windows-latest steps: - uses: hecrj/setup-rust-action@v1 - uses: actions/checkout@master - name: Enable Link Time Optimizations run: | echo "[profile.release]" >> Cargo.toml echo "lto = true" >> Cargo.toml - 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 - name: Run the application without starting the shell run: | sed -i '1 i\#![windows_subsystem = \"windows\"]' examples/todos/src/main.rs - name: Build todos binary run: cargo build --verbose --release --package todos - name: Archive todos binary uses: actions/upload-artifact@v1 with: name: todos-x86_64-pc-windows-msvc path: target/release/todos.exe todos_macos: runs-on: macOS-latest steps: - uses: hecrj/setup-rust-action@v1 - uses: actions/checkout@master - name: Enable Link Time Optimizations run: | echo "[profile.release]" >> Cargo.toml echo "lto = true" >> Cargo.toml - name: Build todos binary env: MACOSX_DEPLOYMENT_TARGET: 10.14 run: cargo build --verbose --release --package todos - name: Open binary via double-click run: chmod +x target/release/todos - name: Archive todos binary uses: actions/upload-artifact@v1 with: name: todos-x86_64-apple-darwin path: target/release/todos todos_raspberry: runs-on: ubuntu-latest steps: - uses: hecrj/setup-rust-action@v1 - uses: actions/checkout@master - name: Install cross run: cargo install cross - name: Enable Link Time Optimizations run: | echo "[profile.release]" >> Cargo.toml echo "lto = true" >> Cargo.toml - name: Build todos binary for Raspberry Pi 3/4 (64 bits) run: cross build --verbose --release --package todos --target aarch64-unknown-linux-gnu - name: Archive todos binary uses: actions/upload-artifact@v1 with: name: todos-aarch64-unknown-linux-gnu path: target/aarch64-unknown-linux-gnu/release/todos - name: Build todos binary for Raspberry Pi 2/3/4 (32 bits) run: cross build --verbose --release --package todos --target armv7-unknown-linux-gnueabihf - name: Archive todos binary uses: actions/upload-artifact@v1 with: name: todos-armv7-unknown-linux-gnueabihf path: target/armv7-unknown-linux-gnueabihf/release/todos