mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 13:30:38 +00:00
Release workflow improvements, hopefully windows on arm support
This commit is contained in:
parent
d0aa55ba04
commit
3071a1154c
4 changed files with 33 additions and 125 deletions
25
.github/workflows/release.yaml
vendored
25
.github/workflows/release.yaml
vendored
|
@ -6,6 +6,9 @@ on:
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TARGET_DIR: output
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
name: Create release
|
name: Create release
|
||||||
|
@ -18,7 +21,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get version from manifest
|
- name: Get version from manifest
|
||||||
uses: SebRollen/toml-action@0ad94c4a52c402aaa76e14e8a43551163b6cedf9
|
uses: SebRollen/toml-action@9062fbef52816d61278d24ce53c8070440e1e8dd
|
||||||
id: get_version
|
id: get_version
|
||||||
with:
|
with:
|
||||||
file: Cargo.toml
|
file: Cargo.toml
|
||||||
|
@ -26,12 +29,12 @@ jobs:
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
name: ${{ steps.get_version.outputs.value }}
|
||||||
tag_name: v${{ steps.get_version.outputs.value }}
|
tag_name: v${{ steps.get_version.outputs.value }}
|
||||||
release_name: ${{ steps.get_version.outputs.value }}
|
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
assets:
|
assets:
|
||||||
|
@ -85,31 +88,37 @@ jobs:
|
||||||
runner-os: windows-latest
|
runner-os: windows-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-windows-x86_64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-windows-x86_64
|
||||||
cargo-target: x86_64-pc-windows-msvc
|
cargo-target: x86_64-pc-windows-msvc
|
||||||
|
cargo-features: reqwest/rustls-tls
|
||||||
|
|
||||||
- name: Windows aarch64
|
- name: Windows aarch64
|
||||||
runner-os: windows-latest
|
runner-os: windows-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-windows-aarch64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-windows-aarch64
|
||||||
cargo-target: aarch64-pc-windows-msvc
|
cargo-target: aarch64-pc-windows-msvc
|
||||||
|
cargo-features: reqwest/default-tls
|
||||||
|
|
||||||
- name: Linux x86_64
|
- name: Linux x86_64
|
||||||
runner-os: ubuntu-latest
|
runner-os: ubuntu-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-linux-x86_64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-linux-x86_64
|
||||||
cargo-target: x86_64-unknown-linux-gnu
|
cargo-target: x86_64-unknown-linux-gnu
|
||||||
|
cargo-features: reqwest/rustls-tls
|
||||||
|
|
||||||
- name: Linux aarch64
|
- name: Linux aarch64
|
||||||
runner-os: ubuntu-latest
|
runner-os: ubuntu-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-linux-aarch64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-linux-aarch64
|
||||||
cargo-target: aarch64-unknown-linux-gnu
|
cargo-target: aarch64-unknown-linux-gnu
|
||||||
|
cargo-features: reqwest/rustls-tls
|
||||||
|
|
||||||
- name: macOS x86_64
|
- name: macOS x86_64
|
||||||
runner-os: macos-latest
|
runner-os: macos-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-macos-x86_64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-macos-x86_64
|
||||||
cargo-target: x86_64-apple-darwin
|
cargo-target: x86_64-apple-darwin
|
||||||
|
cargo-features: reqwest/rustls-tls
|
||||||
|
|
||||||
- name: macOS aarch64
|
- name: macOS aarch64
|
||||||
runner-os: macos-latest
|
runner-os: macos-latest
|
||||||
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-macos-aarch64
|
artifact-name: lune-${{ needs.create-release.outputs.manifest_version }}-macos-aarch64
|
||||||
cargo-target: aarch64-apple-darwin
|
cargo-target: aarch64-apple-darwin
|
||||||
|
cargo-features: reqwest/rustls-tls
|
||||||
|
|
||||||
name: Build - ${{ matrix.name }}
|
name: Build - ${{ matrix.name }}
|
||||||
runs-on: ${{ matrix.runner-os }}
|
runs-on: ${{ matrix.runner-os }}
|
||||||
|
@ -122,7 +131,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.cargo-target }}
|
targets: ${{ matrix.cargo-target }}
|
||||||
|
|
||||||
- name: Install tooling
|
- name: Install tooling (aarch64-unknown-linux-gnu)
|
||||||
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu'
|
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
|
@ -130,9 +139,11 @@ jobs:
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||||
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: cargo build --package lune-cli --locked --release --all-features --target ${{ matrix.cargo-target }}
|
run: |
|
||||||
env:
|
cargo build \
|
||||||
CARGO_TARGET_DIR: output
|
--locked --release --all-features \
|
||||||
|
--target ${{ matrix.cargo-target }} \
|
||||||
|
--features ${{ matrix.cargo-features }}
|
||||||
|
|
||||||
- name: Create binary archive
|
- name: Create binary archive
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
# Run an individual test using the Lune CLI
|
# Run an individual test using the Lune CLI
|
||||||
run-test TEST_NAME:
|
run-test TEST_NAME:
|
||||||
cargo run -- "tests/{{TEST_NAME}}"
|
cargo run --features reqwest/rustls-tls -- "tests/{{TEST_NAME}}"
|
||||||
|
|
||||||
# Run an individual file using the Lune CLI
|
# Run an individual file using the Lune CLI
|
||||||
run-file FILE_NAME:
|
run-file FILE_NAME:
|
||||||
cargo run -- "{{FILE_NAME}}"
|
cargo run --features reqwest/rustls-tls -- "{{FILE_NAME}}"
|
||||||
|
|
||||||
# Run tests for the Lune library
|
# Run tests for the Lune library
|
||||||
test:
|
test:
|
||||||
cargo test --package lune -- --test-threads 1
|
cargo test --features reqwest/rustls-tls --package lune -- --test-threads 1
|
||||||
|
|
||||||
# Run tests for the Lune CLI
|
# Run tests for the Lune CLI
|
||||||
test-cli:
|
test-cli:
|
||||||
cargo test --package lune-cli
|
cargo test --features reqwest/rustls-tls --package lune-cli
|
||||||
|
|
||||||
# Generate gitbook directory
|
# Generate gitbook directory
|
||||||
generate-gitbook:
|
generate-gitbook:
|
||||||
|
|
106
Cargo.lock
generated
106
Cargo.lock
generated
|
@ -875,19 +875,6 @@ dependencies = [
|
||||||
"want",
|
"want",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hyper-rustls"
|
|
||||||
version = "0.23.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c"
|
|
||||||
dependencies = [
|
|
||||||
"http",
|
|
||||||
"hyper",
|
|
||||||
"rustls",
|
|
||||||
"tokio",
|
|
||||||
"tokio-rustls",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper-tungstenite"
|
name = "hyper-tungstenite"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
|
@ -1605,7 +1592,6 @@ dependencies = [
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"hyper",
|
"hyper",
|
||||||
"hyper-rustls",
|
|
||||||
"ipnet",
|
"ipnet",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
|
@ -1613,37 +1599,18 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"rustls",
|
|
||||||
"rustls-pemfile",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"webpki-roots",
|
|
||||||
"winreg",
|
"winreg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ring"
|
|
||||||
version = "0.16.20"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"libc",
|
|
||||||
"once_cell",
|
|
||||||
"spin",
|
|
||||||
"untrusted",
|
|
||||||
"web-sys",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rmp"
|
name = "rmp"
|
||||||
version = "0.8.11"
|
version = "0.8.11"
|
||||||
|
@ -1716,27 +1683,6 @@ dependencies = [
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls"
|
|
||||||
version = "0.20.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
|
|
||||||
dependencies = [
|
|
||||||
"log",
|
|
||||||
"ring",
|
|
||||||
"sct",
|
|
||||||
"webpki",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-pemfile"
|
|
||||||
version = "1.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
|
|
||||||
dependencies = [
|
|
||||||
"base64 0.21.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.13"
|
version = "1.0.13"
|
||||||
|
@ -1755,16 +1701,6 @@ version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "sct"
|
|
||||||
version = "0.7.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
|
|
||||||
dependencies = [
|
|
||||||
"ring",
|
|
||||||
"untrusted",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semver"
|
name = "semver"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
|
@ -1927,12 +1863,6 @@ dependencies = [
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "spin"
|
|
||||||
version = "0.5.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "standback"
|
name = "standback"
|
||||||
version = "0.2.17"
|
version = "0.2.17"
|
||||||
|
@ -2192,17 +2122,6 @@ dependencies = [
|
||||||
"syn 2.0.15",
|
"syn 2.0.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tokio-rustls"
|
|
||||||
version = "0.23.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
|
|
||||||
dependencies = [
|
|
||||||
"rustls",
|
|
||||||
"tokio",
|
|
||||||
"webpki",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-tungstenite"
|
name = "tokio-tungstenite"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
|
@ -2354,12 +2273,6 @@ version = "0.2.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6"
|
checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "untrusted"
|
|
||||||
version = "0.7.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
@ -2505,25 +2418,6 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "webpki"
|
|
||||||
version = "0.22.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
|
|
||||||
dependencies = [
|
|
||||||
"ring",
|
|
||||||
"untrusted",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "webpki-roots"
|
|
||||||
version = "0.22.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
|
|
||||||
dependencies = [
|
|
||||||
"webpki",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "winapi"
|
name = "winapi"
|
||||||
version = "0.3.9"
|
version = "0.3.9"
|
||||||
|
|
|
@ -46,14 +46,17 @@ hyper-tungstenite = { version = "0.9" }
|
||||||
tokio-tungstenite = { version = "0.18" }
|
tokio-tungstenite = { version = "0.18" }
|
||||||
|
|
||||||
# Using rustls instead of the default OpenSSL allows us to have much more portable binaries
|
# Using rustls instead of the default OpenSSL allows us to have much more portable binaries
|
||||||
reqwest = { version = "0.11", default-features = false, features = [
|
#
|
||||||
"rustls-tls",
|
# Notes:
|
||||||
] }
|
#
|
||||||
|
# - Rustls does not yet compile on windows aarch64, so we use default tls there
|
||||||
# Rustls does not yet compile on windows aarch64, so we use default tls there
|
# https://github.com/briansmith/ring/issues/1167
|
||||||
# https://github.com/briansmith/ring/issues/1167
|
#
|
||||||
[target.aarch64-pc-windows-msvc.dependencies]
|
# - Cargo does not support per-target features, we have to add the feature in the build command itself
|
||||||
reqwest = "0.11"
|
# https://github.com/rust-lang/cargo/issues/1197
|
||||||
|
[dependencies.reqwest]
|
||||||
|
version = "0.11"
|
||||||
|
default-features = false
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
|
Loading…
Reference in a new issue