Skip to content

Commit

Permalink
Merge pull request #5 from 5GameMaker/master
Browse files Browse the repository at this point in the history
More Windows + cleanups
  • Loading branch information
5GameMaker authored Aug 25, 2024
2 parents 4792c69 + 5cc430d commit 01a5220
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 40 deletions.
82 changes: 44 additions & 38 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,59 +19,65 @@ jobs:
- uses: ningenMe/[email protected]
- uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools mold gcc-mingw-w64 gcc-multilib gcc-mingw-w64-x86-64 clang-13 llvm-13 lld-13 llvm-dev
packages: musl-tools mold gcc-mingw-w64 gcc-multilib gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 clang-13 llvm-13 lld-13 llvm-dev
version: 1.0
- run: cargo install cargo-xwin --locked
- run: echo "XWIN_ARCH=x86,x86_64,aarch64,aarch" >> "$GITHUB_ENV"

- name: Create release dir
run: rm -fr target/github-release && mkdir -p target/github-release
- name: Install x86_64-unknown-linux-gnu toolchain

- name: Build for x86_64-unknown-linux-gnu
run: rustup target add x86_64-unknown-linux-gnu
cargo build --verbose --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/discord-backup-util \
target/github-release/discord-backup-util.x86_64-unknown-linux-gnu

- name: Build for x86_64-unknown-linux-gnu
run: cargo build --verbose --release --target x86_64-unknown-linux-gnu
- name: Copy x86_64-unknown-linux-gnu artifact
run: cp target/x86_64-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-gnu

- name: Install x86_64-unknown-linux-musl toolchain
run: rustup target add x86_64-unknown-linux-musl
- name: Build for x86_64-unknown-linux-gnu
run: cargo build --verbose --release --target x86_64-unknown-linux-musl
- name: Copy x86_64-unknown-linux-musl artifact
run: cp target/x86_64-unknown-linux-musl/release/discord-backup-util target/github-release/discord-backup-util.x86_64-unknown-linux-musl

- name: Install i586-unknown-linux-gnu toolchain
run: rustup target add i586-unknown-linux-gnu
cargo build --verbose --release --target x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/discord-backup-util \
target/github-release/discord-backup-util.x86_64-unknown-linux-musl

- name: Build for i586-unknown-linux-gnu
run: cargo build --verbose --release --target i586-unknown-linux-gnu --no-default-features --features minreq
- name: Copy i586-unknown-linux-gnu artifact
run: cp target/i586-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i586-unknown-linux-gnu

- name: Install i686-unknown-linux-gnu toolchain
run: rustup target add i686-unknown-linux-gnu
run: rustup target add i586-unknown-linux-gnu
cargo build --verbose --release --target i586-unknown-linux-gnu --no-default-features --features minreq
cp target/i586-unknown-linux-gnu/release/discord-backup-util \
target/github-release/discord-backup-util.i586-unknown-linux-gnu

- name: Build for i686-unknown-linux-gnu
run: cargo build --verbose --release --target i686-unknown-linux-gnu
- name: Copy i686-unknown-linux-gnu artifact
run: cp target/i686-unknown-linux-gnu/release/discord-backup-util target/github-release/discord-backup-util.i686-unknown-linux-gnu
run: rustup target add i686-unknown-linux-gnu
cargo build --verbose --release --target i686-unknown-linux-gnu
cp target/i686-unknown-linux-gnu/release/discord-backup-util \
target/github-release/discord-backup-util.i686-unknown-linux-gnu

- name: Install x86_64-pc-windows-gnu toolchain
run: rustup target add x86_64-pc-windows-gnu
- name: Build for x86_64-pc-windows-gnu
run: cargo build --verbose --release --target x86_64-pc-windows-gnu
- name: Copy x86_64-pc-windows-gnu artifact
run: cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe
run: rustup target add x86_64-pc-windows-gnu
cargo build --verbose --release --target x86_64-pc-windows-gnu
cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe \
target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe

- name: Install x86_64-pc-windows-msvc toolchain
run: rustup target add x86_64-pc-windows-msvc
- name: Build for x86_64-pc-windows-msvc
run: cargo xwin build --verbose --release --target x86_64-pc-windows-msvc
- name: Copy x86_64-pc-windows-msvc artifact
run: cp target/x86_64-pc-windows-msvc/release/discord-backup-util.exe target/github-release/discord-backup-util.x86_64-pc-windows-msvc.exe

- uses: colathro/[email protected]
run: rustup target add x86_64-pc-windows-msvc
cargo xwin build --verbose --release --target x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/release/discord-backup-util.exe \
target/github-release/discord-backup-util.x86_64-pc-windows-msvc.exe

- name: Build for x86_64-pc-windows-gnu
run: rustup target add x86_64-pc-windows-gnu
cargo build --verbose --release --target x86_64-pc-windows-gnu
cp target/x86_64-pc-windows-gnu/release/discord-backup-util.exe \
target/github-release/discord-backup-util.x86_64-pc-windows-gnu.exe

- name: Build for i686-pc-windows-gnu
run: rustup target add i686-pc-windows-gnu
cargo build --verbose --release --target i686-pc-windows-gnu
cp target/i686-pc-windows-gnu/release/discord-backup-util.exe \
target/github-release/discord-backup-util.i686-pc-windows-gnu.exe

- uses: 5GameMaker/crate-version@c1672654ea26c815a187066de39d91d97e174685
id: crate-version
with:
file: Cargo.toml

- uses: ncipollo/release-action@v1
with:
tag: v${{ steps.crate-version.outputs.version }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "discord-backup-util"
version = "0.2.1"
version = "0.2.2"
authors = ["buj"]
license = "AGPL3-or-later"
description = "A tiny tool to backup stuff to Discord"
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ to some C packages failing to compile.
If build fails due to dependencies, add `--no-default-features --features minreq` to command line
(This may take longer to compile as for `minreq` we use bundled OpenSSL instead of RusTLS) (Not all
targets can be fixed this way).

## Windows

We never needed to use this on Windows, so we don't guarantee that any Windows build will even launch.

## Features policy

If a feature is not too insane, feel free to submit a [feature request](https://github.com/5GameMaker/discord-backup-util/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=feature%3A+This+one%21).

0 comments on commit 01a5220

Please sign in to comment.