From aabc5ff8ece3d8ff0fdd9fcf8f03879eb100e725 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 18 Dec 2024 11:24:05 -0300 Subject: [PATCH 1/8] wip Signed-off-by: Carlos Alexandro Becker --- .cargo/config.toml | 8 +++- .gitignore | 3 +- .goreleaser.yaml | 107 +++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 81 ++++++++++++++++++++++++++++++++-- Cargo.toml | 39 +++++++++++------ 5 files changed, 218 insertions(+), 20 deletions(-) create mode 100644 .goreleaser.yaml diff --git a/.cargo/config.toml b/.cargo/config.toml index 74bc45c4e9..c1743d7e78 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,5 +9,9 @@ runner = 'wasm-bindgen-test-runner' rustflags = [ # We can guarantee that this target will always run on a CPU with _at least_ # these capabilities, so let's optimize for them - "-Ctarget-cpu=apple-m1" -] \ No newline at end of file + "-Ctarget-cpu=apple-m1", + "-Clink-arg=-s", +] + +[target.x86_64-apple-darwin] +rustflags = ["-Clink-arg=-s"] diff --git a/.gitignore b/.gitignore index 571638ca91..1ac49bcdf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # These are backup files generated by rustfmt **/*.rs.bk - # required by nix .direnv/ result/ @@ -19,3 +18,5 @@ NOTES # for nix users .direnv/ +dist/ +.intentionally-empty-file.o diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000000..5f8636dc67 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,107 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines below are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 2 + +# before: +# hooks: +# if you don't do these things before calling goreleaser, it might be a +# good idea to do them here: +# - rustup default stable +# - cargo install --locked cargo-zigbuild +# - cargo fetch --locked + +metadata: + maintainers: + - Raphael Amorim + license: MIT + description: A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers. + homepage: https://raphamorim.io/rio/ + +builds: + - id: darwin-and-windows + builder: rust + flags: + # - --release + - -p=rioterm + - -vv + env: + - MACOSX_DEPLOYMENT_TARGET="11.0" + # - RUST_BACKTRACE=1 + targets: + # - x86_64-apple-darwin + # - x86_64-pc-windows-gnu + - aarch64-apple-darwin + + - id: wayland + builder: rust + # dir: ./frontends/rioterm/ + flags: + - -p=rioterm + - --release + - --no-default-features + - --features=wayland + targets: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + + - id: x11 + builder: rust + # dir: ./frontends/rioterm/ + flags: + - -p=rioterm + - --release + - --no-default-features + - --features=x11 + targets: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + +universal_binaries: + - replace: true + +nfpms: + - formats: + - deb + - apk + - rpm + contents: + - src: ./misc/rio.desktop + dst: /usr/share/applications/rio.desktop + - src: ./misc/rio.terminfo + dst: /usr/share/info/rio.terminfo + - src: ./misc/logo.svg + dst: /usr/share/icons/hicolor/scalable/apps/rio.svg + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + +release: + footer: >- + + --- + + Released by [GoReleaser](https://github.com/goreleaser/goreleaser). diff --git a/Cargo.lock b/Cargo.lock index 749f229ee0..6f61f8a63f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2739,6 +2739,16 @@ dependencies = [ "rand_core 0.3.1", ] +[[package]] +name = "read-fonts" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a3c6d6cacf48eb4f7d069dfd59c7d6b655b7a008a0b461176e0a29ae73db95" +dependencies = [ + "bytemuck", + "font-types", +] + [[package]] name = "read-fonts" version = "0.25.2" @@ -2859,7 +2869,7 @@ dependencies = [ "rustc-hash 2.1.0", "serde", "smallvec", - "sugarloaf", + "sugarloaf 0.2.2", "teletypewriter", "toml", "tracing", @@ -3172,6 +3182,16 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "skrifa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261784bf7b71ef6bc347f765de6c8e32e952104d5c4fc2cd4070872fce8c3e81" +dependencies = [ + "bytemuck", + "read-fonts 0.24.0", +] + [[package]] name = "skrifa" version = "0.26.2" @@ -3179,7 +3199,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a16eb047396452019439e1d6eca13581c141275b7d743f0262f79d65c09c70" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.25.2", ] [[package]] @@ -3366,6 +3386,61 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "sugarloaf" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6869c6771b7d2639f879a97303e51319372839bb335efb9f0cbbdae973f5cb68" +dependencies = [ + "ab_glyph", + "approx", + "array-concat", + "bytemuck", + "console_error_panic_hook", + "console_log", + "crossbeam-channel", + "crossbeam-deque", + "fontconfig-parser", + "futures", + "guillotiere", + "halfbrown", + "image", + "js-sys", + "librashader-cache", + "librashader-common", + "librashader-pack", + "librashader-preprocess", + "librashader-presets", + "librashader-reflect", + "librashader-runtime", + "linked-hash-map", + "lru", + "memmap2", + "num-traits", + "ordered-float", + "parking_lot", + "raw-window-handle", + "rayon", + "rustc-hash 2.1.0", + "serde", + "skrifa 0.25.0", + "slotmap", + "thiserror 2.0.3", + "tinyvec", + "tracing", + "ttf-parser", + "twox-hash", + "unicode-width 0.2.0", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test", + "web-sys", + "wgpu", + "xi-unicode", + "yazi", + "zeno", +] + [[package]] name = "sugarloaf" version = "0.2.3" @@ -3405,7 +3480,7 @@ dependencies = [ "rio-window 0.2.2", "rustc-hash 2.1.0", "serde", - "skrifa", + "skrifa 0.26.2", "slotmap", "thiserror 2.0.3", "tinyvec", diff --git a/Cargo.toml b/Cargo.toml index cbafeda406..2e4033aece 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,14 @@ [workspace] members = [ - "sugarloaf", - "teletypewriter", - "corcovado", - "copa", - "rio-proc-macros", - "rio-backend", - "rio-window", - "wa", - "frontends/rioterm" + "sugarloaf", + "teletypewriter", + "corcovado", + "copa", + "rio-proc-macros", + "rio-backend", + "rio-window", + "wa", + "frontends/rioterm", ] resolver = "2" @@ -38,15 +38,26 @@ rio-proc-macros = { path = "rio-proc-macros", version = "0.2.2" } corcovado = { path = "corcovado", version = "0.2.2" } wa = { path = "wa", version = "0.1.7" } -sugarloaf = { path = "sugarloaf", version = "0.2.2" } +sugarloaf = { version = "0.2.2" } raw-window-handle = { version = "0.6.2", features = ["std"] } -parking_lot = { version = "0.12.3", features = ["nightly", "hardware-lock-elision"] } +parking_lot = { version = "0.12.3", features = [ + "nightly", + "hardware-lock-elision", +] } rustc-hash = "2.1.0" unicode-width = "0.2.0" base64 = "0.22.1" -image_rs = { package = "image", version = "0.25.5", default-features = false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] } +image_rs = { package = "image", version = "0.25.5", default-features = false, features = [ + "gif", + "jpeg", + "ico", + "png", + "pnm", + "webp", + "bmp", +] } regex = "1.11.1" -bytemuck = { version = "1.20.0", features = [ "derive" ] } +bytemuck = { version = "1.20.0", features = ["derive"] } serde = { version = "1.0.208", features = ["derive"] } wgpu = "23.0.1" libc = "0.2.161" @@ -65,7 +76,7 @@ objc = "0.2.7" memmap2 = "0.9.5" [profile.release] -lto = true +# lto = true strip = true debug = "limited" codegen-units = 1 From 1dce2f573aed15f3756a38fa23832267d95f7d49 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 18 Dec 2024 12:01:20 -0300 Subject: [PATCH 2/8] wip Signed-off-by: Carlos Alexandro Becker --- .cargo/config.toml | 4 --- .goreleaser.yaml | 11 +++---- Cargo.lock | 81 ++-------------------------------------------- Cargo.toml | 4 +-- 4 files changed, 10 insertions(+), 90 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c1743d7e78..a9f8cb3c1d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -10,8 +10,4 @@ rustflags = [ # We can guarantee that this target will always run on a CPU with _at least_ # these capabilities, so let's optimize for them "-Ctarget-cpu=apple-m1", - "-Clink-arg=-s", ] - -[target.x86_64-apple-darwin] -rustflags = ["-Clink-arg=-s"] diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5f8636dc67..677b23b4fa 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -27,15 +27,14 @@ builds: - id: darwin-and-windows builder: rust flags: - # - --release + - --release - -p=rioterm - - -vv env: - - MACOSX_DEPLOYMENT_TARGET="11.0" - # - RUST_BACKTRACE=1 + - MACOSX_DEPLOYMENT_TARGET=11.0 + - RUSTFLAGS=-Clink-arg=-s targets: - # - x86_64-apple-darwin - # - x86_64-pc-windows-gnu + - x86_64-apple-darwin + - x86_64-pc-windows-gnu - aarch64-apple-darwin - id: wayland diff --git a/Cargo.lock b/Cargo.lock index 6f61f8a63f..749f229ee0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2739,16 +2739,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "read-fonts" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a3c6d6cacf48eb4f7d069dfd59c7d6b655b7a008a0b461176e0a29ae73db95" -dependencies = [ - "bytemuck", - "font-types", -] - [[package]] name = "read-fonts" version = "0.25.2" @@ -2869,7 +2859,7 @@ dependencies = [ "rustc-hash 2.1.0", "serde", "smallvec", - "sugarloaf 0.2.2", + "sugarloaf", "teletypewriter", "toml", "tracing", @@ -3182,16 +3172,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "skrifa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261784bf7b71ef6bc347f765de6c8e32e952104d5c4fc2cd4070872fce8c3e81" -dependencies = [ - "bytemuck", - "read-fonts 0.24.0", -] - [[package]] name = "skrifa" version = "0.26.2" @@ -3199,7 +3179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3a16eb047396452019439e1d6eca13581c141275b7d743f0262f79d65c09c70" dependencies = [ "bytemuck", - "read-fonts 0.25.2", + "read-fonts", ] [[package]] @@ -3386,61 +3366,6 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" -[[package]] -name = "sugarloaf" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6869c6771b7d2639f879a97303e51319372839bb335efb9f0cbbdae973f5cb68" -dependencies = [ - "ab_glyph", - "approx", - "array-concat", - "bytemuck", - "console_error_panic_hook", - "console_log", - "crossbeam-channel", - "crossbeam-deque", - "fontconfig-parser", - "futures", - "guillotiere", - "halfbrown", - "image", - "js-sys", - "librashader-cache", - "librashader-common", - "librashader-pack", - "librashader-preprocess", - "librashader-presets", - "librashader-reflect", - "librashader-runtime", - "linked-hash-map", - "lru", - "memmap2", - "num-traits", - "ordered-float", - "parking_lot", - "raw-window-handle", - "rayon", - "rustc-hash 2.1.0", - "serde", - "skrifa 0.25.0", - "slotmap", - "thiserror 2.0.3", - "tinyvec", - "tracing", - "ttf-parser", - "twox-hash", - "unicode-width 0.2.0", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", - "wgpu", - "xi-unicode", - "yazi", - "zeno", -] - [[package]] name = "sugarloaf" version = "0.2.3" @@ -3480,7 +3405,7 @@ dependencies = [ "rio-window 0.2.2", "rustc-hash 2.1.0", "serde", - "skrifa 0.26.2", + "skrifa", "slotmap", "thiserror 2.0.3", "tinyvec", diff --git a/Cargo.toml b/Cargo.toml index 2e4033aece..1c4b31ca51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ rio-proc-macros = { path = "rio-proc-macros", version = "0.2.2" } corcovado = { path = "corcovado", version = "0.2.2" } wa = { path = "wa", version = "0.1.7" } -sugarloaf = { version = "0.2.2" } +sugarloaf = { path = "sugarloaf", version = "0.2.2" } raw-window-handle = { version = "0.6.2", features = ["std"] } parking_lot = { version = "0.12.3", features = [ "nightly", @@ -76,7 +76,7 @@ objc = "0.2.7" memmap2 = "0.9.5" [profile.release] -# lto = true +lto = true strip = true debug = "limited" codegen-units = 1 From 8aa222227dfbb2ba43e6f0c8853bf01ccf6ba886 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:11:13 -0300 Subject: [PATCH 3/8] ci: push --- .github/workflows/release-new.yml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release-new.yml diff --git a/.github/workflows/release-new.yml b/.github/workflows/release-new.yml new file mode 100644 index 0000000000..1234d082ef --- /dev/null +++ b/.github/workflows/release-new.yml @@ -0,0 +1,42 @@ +name: goreleaser + +on: + workflow_dispatch: + pull_request: + push: + tags: + - "*" + +permissions: + contents: write + packages: write + issues: write + id-token: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + env: + flags: "" + steps: + - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} + run: echo "flags=--snapshot" >> $GITHUB_ENV + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: mlugg/setup-zig@v1 + - run: rustup default nightly + - run: cargo install --locked cargo-zigbuild + - run: cargo fetch --locked + - uses: goreleaser/goreleaser-action@v6 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean ${{ env.flags }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + GH_PAT: ${{ secrets.GH_PAT }} From a971f23ce5f63a3219aac437dc43e6184826a5c2 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:29:03 -0300 Subject: [PATCH 4/8] ci: new nightly job Signed-off-by: Carlos Alexandro Becker --- .github/workflows/nightly-new.yml | 154 ++++++++++++++++++++++++++++++ .goreleaser.yaml | 14 ++- 2 files changed, 160 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/nightly-new.yml diff --git a/.github/workflows/nightly-new.yml b/.github/workflows/nightly-new.yml new file mode 100644 index 0000000000..f5e5431aa3 --- /dev/null +++ b/.github/workflows/nightly-new.yml @@ -0,0 +1,154 @@ +name: nightly-oss + +on: + workflow_dispatch: + schedule: + - cron: 0 0 * * * + +permissions: + contents: write + id-token: write + packages: write + +jobs: + prepare-linux: + strategy: + fail-fast: true + matrix: + TARGET: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + - name: sha_short + shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + path: dist/${{ env.TARGET }} + key: ${{ env.TARGET }}-${{ env.sha_short }} + - run: rustup toolchain install stable --profile minimal + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser-pro + version: "nightly" + args: release --clean --nightly --split + env: + TARGET: ${{ env.TARGET }} + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + prepare-darwin: + strategy: + fail-fast: true + matrix: + TARGET: + - x86_64-apple-darwin + - aarch64-apple-darwin + runs-on: macos-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + - name: sha_short + shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + path: dist/${{ env.TARGET }} + key: ${{ env.TARGET }}-${{ env.sha_short }} + - run: rustup toolchain install stable --profile minimal + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser-pro + version: "nightly" + args: release --clean --nightly --split + env: + TARGET: ${{ env.TARGET }} + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + prepare-windows: + strategy: + fail-fast: true + matrix: + TARGET: + - x86_64-pc-windows-gnu + runs-on: macos-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + - name: sha_short + shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + - uses: actions/cache@v4 + with: + path: dist/${{ env.TARGET }} + key: ${{ env.TARGET }}-${{ env.sha_short }} + - run: rustup toolchain install stable --profile minimal + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser-pro + version: "nightly" + args: release --clean --nightly --split + env: + TARGET: ${{ env.TARGET }} + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + + release: + runs-on: ubuntu-latest + needs: + - prepare-linux + - prepare-windows + - prepare-darwin + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + - name: sha_short + shell: bash + run: | + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + + # restore cache dirs + - uses: actions/cache@v4 + with: + path: dist/x86_64-apple-darwin + key: x86_64-apple-darwin-${{ env.sha_short }} + - uses: actions/cache@v4 + with: + path: dist/aarch64-apple-darwin + key: aarch64-apple-darwin-${{ env.sha_short }} + - uses: actions/cache@v4 + with: + path: dist/x86_64-pc-windows-gnu + key: x86_64-pc-windows-gnu-${{ env.sha_short }} + - uses: actions/cache@v4 + with: + path: dist/x86_64-unknown-linux-gnu + key: x86_64-unknown-linux-gnu-${{ env.sha_short }} + - uses: actions/cache@v4 + with: + path: dist/aarch64-unknown-linux-gnu + key: aarch64-unknown-linux-gnu-${{ env.sha_short }} + + # merge + - uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser-pro + version: "nightly" + args: continue --merge + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + # MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }} + # MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }} + # MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }} + # MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }} + # MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 677b23b4fa..0ba6aa8027 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,14 +8,6 @@ version: 2 -# before: -# hooks: -# if you don't do these things before calling goreleaser, it might be a -# good idea to do them here: -# - rustup default stable -# - cargo install --locked cargo-zigbuild -# - cargo fetch --locked - metadata: maintainers: - Raphael Amorim @@ -23,9 +15,13 @@ metadata: description: A hardware-accelerated GPU terminal emulator focusing to run in desktops and browsers. homepage: https://raphamorim.io/rio/ +partial: + by: target + builds: - id: darwin-and-windows builder: rust + command: build flags: - --release - -p=rioterm @@ -39,6 +35,7 @@ builds: - id: wayland builder: rust + command: build # dir: ./frontends/rioterm/ flags: - -p=rioterm @@ -51,6 +48,7 @@ builds: - id: x11 builder: rust + command: build # dir: ./frontends/rioterm/ flags: - -p=rioterm From c6e4335167301df6c676c7083dcae25ac381540a Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:35:03 -0300 Subject: [PATCH 5/8] wip --- .github/workflows/nightly-new.yml | 19 ++++++++------ .github/workflows/release-new.yml | 42 ------------------------------- .goreleaser.yaml | 11 +------- 3 files changed, 12 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/release-new.yml diff --git a/.github/workflows/nightly-new.yml b/.github/workflows/nightly-new.yml index f5e5431aa3..2cbdf088e3 100644 --- a/.github/workflows/nightly-new.yml +++ b/.github/workflows/nightly-new.yml @@ -1,7 +1,10 @@ -name: nightly-oss +name: snapshot-oss + +# TODO: make it auto-snapshot/nightly/release (?) on: workflow_dispatch: + pull_request: schedule: - cron: 0 0 * * * @@ -35,8 +38,8 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "nightly" - args: release --clean --nightly --split + version: "snapshot" + args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} @@ -65,8 +68,8 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "nightly" - args: release --clean --nightly --split + version: "snapshot" + args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} @@ -94,8 +97,8 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "nightly" - args: release --clean --nightly --split + version: "snapshot" + args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} @@ -142,7 +145,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "nightly" + version: "snapshot" args: continue --merge env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/release-new.yml b/.github/workflows/release-new.yml deleted file mode 100644 index 1234d082ef..0000000000 --- a/.github/workflows/release-new.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: goreleaser - -on: - workflow_dispatch: - pull_request: - push: - tags: - - "*" - -permissions: - contents: write - packages: write - issues: write - id-token: write - -jobs: - goreleaser: - runs-on: ubuntu-latest - env: - flags: "" - steps: - - if: ${{ !startsWith(github.ref, 'refs/tags/v') }} - run: echo "flags=--snapshot" >> $GITHUB_ENV - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: mlugg/setup-zig@v1 - - run: rustup default nightly - - run: cargo install --locked cargo-zigbuild - - run: cargo fetch --locked - - uses: goreleaser/goreleaser-action@v6 - with: - # either 'goreleaser' (default) or 'goreleaser-pro' - distribution: goreleaser - # 'latest', 'nightly', or a semver - version: "~> v2" - args: release --clean ${{ env.flags }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution - # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0ba6aa8027..7e658b7797 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,7 +36,6 @@ builds: - id: wayland builder: rust command: build - # dir: ./frontends/rioterm/ flags: - -p=rioterm - --release @@ -49,7 +48,6 @@ builds: - id: x11 builder: rust command: build - # dir: ./frontends/rioterm/ flags: - -p=rioterm - --release @@ -77,14 +75,7 @@ nfpms: archives: - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - # use zip for windows archives + name_template: "{{ .ProjectName }}_{{ .Target }}" format_overrides: - goos: windows format: zip From b008d30572e9d667490cb05d3fc381a96baec842 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:36:26 -0300 Subject: [PATCH 6/8] oops --- .github/workflows/nightly-new.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly-new.yml b/.github/workflows/nightly-new.yml index 2cbdf088e3..f8d37e9154 100644 --- a/.github/workflows/nightly-new.yml +++ b/.github/workflows/nightly-new.yml @@ -1,4 +1,4 @@ -name: snapshot-oss +name: releases-new # TODO: make it auto-snapshot/nightly/release (?) @@ -38,7 +38,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "snapshot" + version: "nightly" args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} @@ -68,7 +68,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "snapshot" + version: "nightly" args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} @@ -97,7 +97,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "snapshot" + version: "nightly" args: release --clean --snapshot --split env: TARGET: ${{ env.TARGET }} @@ -145,7 +145,7 @@ jobs: - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro - version: "snapshot" + version: "nightly" args: continue --merge env: GITHUB_TOKEN: ${{ secrets.GH_PAT }} From 30ec07630e5ba554ff5c94d3aabca1c1eab43abf Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:39:17 -0300 Subject: [PATCH 7/8] fix --- .github/workflows/nightly-new.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly-new.yml b/.github/workflows/nightly-new.yml index f8d37e9154..01d5eb91bf 100644 --- a/.github/workflows/nightly-new.yml +++ b/.github/workflows/nightly-new.yml @@ -32,8 +32,8 @@ jobs: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - uses: actions/cache@v4 with: - path: dist/${{ env.TARGET }} - key: ${{ env.TARGET }}-${{ env.sha_short }} + path: dist/${{ matrix.TARGET }} + key: ${{ matrix.TARGET }}-${{ env.sha_short }} - run: rustup toolchain install stable --profile minimal - uses: goreleaser/goreleaser-action@v6 with: @@ -41,7 +41,7 @@ jobs: version: "nightly" args: release --clean --snapshot --split env: - TARGET: ${{ env.TARGET }} + TARGET: ${{ matrix.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} prepare-darwin: @@ -62,8 +62,8 @@ jobs: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - uses: actions/cache@v4 with: - path: dist/${{ env.TARGET }} - key: ${{ env.TARGET }}-${{ env.sha_short }} + path: dist/${{ matrix.TARGET }} + key: ${{ matrix.TARGET }}-${{ env.sha_short }} - run: rustup toolchain install stable --profile minimal - uses: goreleaser/goreleaser-action@v6 with: @@ -71,7 +71,7 @@ jobs: version: "nightly" args: release --clean --snapshot --split env: - TARGET: ${{ env.TARGET }} + TARGET: ${{ matrix.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} prepare-windows: @@ -91,8 +91,8 @@ jobs: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - uses: actions/cache@v4 with: - path: dist/${{ env.TARGET }} - key: ${{ env.TARGET }}-${{ env.sha_short }} + path: dist/${{ matrix.TARGET }} + key: ${{ matrix.TARGET }}-${{ env.sha_short }} - run: rustup toolchain install stable --profile minimal - uses: goreleaser/goreleaser-action@v6 with: @@ -100,7 +100,7 @@ jobs: version: "nightly" args: release --clean --snapshot --split env: - TARGET: ${{ env.TARGET }} + TARGET: ${{ matrix.TARGET }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} From 44c161d971aa75f1a298eb2c9671c436232796cc Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 12 Jan 2025 11:47:59 -0300 Subject: [PATCH 8/8] env --- .github/workflows/nightly-new.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/nightly-new.yml b/.github/workflows/nightly-new.yml index 01d5eb91bf..821f00bd42 100644 --- a/.github/workflows/nightly-new.yml +++ b/.github/workflows/nightly-new.yml @@ -13,6 +13,11 @@ permissions: id-token: write packages: write +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: full + RUSTFLAGS: "-C link-arg=-s" + jobs: prepare-linux: strategy: