-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: compile on windows Nothing works yet, but at least cargo build runs * Commit from GitHub Actions (test) --------- Co-authored-by: mise[bot] <[email protected]>
- Loading branch information
1 parent
70f4b95
commit b563597
Showing
16 changed files
with
294 additions
and
68 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: release | |
on: | ||
push: | ||
tags: ["v*"] | ||
branches: ["release"] | ||
branches: ["release", "win"] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
@@ -13,19 +13,20 @@ env: | |
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }} | ||
RUSTC_WRAPPER: sccache | ||
SCCACHE_ENDPOINT: minio.jdx.dev | ||
SCCACHE_BUCKET: sccache | ||
SCCACHE_REGION: auto | ||
SCCACHE_S3_NO_CREDENTIALS: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID && '0' || '1' }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }} | ||
|
||
jobs: | ||
build-tarball: | ||
name: build-tarball-${{matrix.name}} | ||
runs-on: ${{matrix.runs-on}} | ||
timeout-minutes: 45 | ||
env: | ||
#RUSTC_WRAPPER: sccache | ||
SCCACHE_ENDPOINT: minio.jdx.dev | ||
SCCACHE_BUCKET: sccache | ||
SCCACHE_REGION: auto | ||
SCCACHE_S3_NO_CREDENTIALS: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID && '0' || '1' }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -70,6 +71,10 @@ jobs: | |
name: macos-arm64 | ||
target: aarch64-apple-darwin | ||
runs-on: macos-14 | ||
# - os: windows | ||
# name: win-x64 | ||
# target: x86_64-pc-windows-gnu | ||
# runs-on: ubuntu-latest | ||
steps: | ||
- if: matrix.os == 'macos' | ||
uses: apple-actions/import-codesign-certs@v3 | ||
|
@@ -78,25 +83,74 @@ jobs: | |
p12-password: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTS_P12_PASS }} | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
- uses: actions/cache@v4 | ||
- name: cache crates | ||
id: cache-crates | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cargo/bin/zipsign | ||
key: ${{ runner.os }}-cargo-zipsign | ||
- run: rustup target add ${{matrix.target}} | ||
- run: rustup toolchain install stable --profile minimal | ||
- if: matrix.os == 'ubuntu' | ||
path: ~/.cargo/registry/cache | ||
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: cargo-registry | ||
- if: matrix.runs-on != 'ubuntu-latest' | ||
run: rustup target add ${{matrix.target}} | ||
- if: matrix.runs-on == 'ubuntu-latest' | ||
uses: taiki-e/install-action@cross | ||
- run: scripts/setup-zipsign.sh | ||
env: | ||
ZIPSIGN: ${{ secrets.ZIPSIGN }} | ||
- run: scripts/build-tarball.sh mise --features openssl/vendored --target ${{matrix.target}} | ||
- run: scripts/build-tarball.sh ${{matrix.target}} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: tarball-${{matrix.target}} | ||
path: | | ||
dist/mise-*.tar.xz | ||
dist/mise-*.tar.gz | ||
if-no-files-found: error | ||
- uses: taiki-e/install-action@v2 | ||
with: { tool: cargo-cache } | ||
- if: steps.cache-crates.outputs.cache-hit != 'true' | ||
run: cargo cache --autoclean | ||
- run: ${SCCACHE_PATH} --show-stats | ||
build-tarball-win: | ||
name: build-tarball-win-${{matrix.arch}} | ||
runs-on: windows-latest | ||
timeout-minutes: 45 | ||
env: | ||
RUSTC_WRAPPER: sccache | ||
SCCACHE_ENDPOINT: minio.jdx.dev | ||
SCCACHE_BUCKET: sccache | ||
SCCACHE_REGION: auto | ||
SCCACHE_S3_NO_CREDENTIALS: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID && '0' || '1' }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.MINIO_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_AWS_SECRET_ACCESS_KEY }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- arch: arm64 | ||
target: aarch64-pc-windows-msvc | ||
- arch: x64 | ||
target: x86_64-pc-windows-msvc | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup target add ${{matrix.target}} | ||
- uses: mozilla-actions/[email protected] | ||
- name: cache crates | ||
id: cache-crates | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cargo/registry/cache | ||
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: cargo-registry | ||
- run: scripts/build-tarball.ps1 ${{matrix.target}} | ||
env: | ||
OS: win | ||
ARCH: ${{matrix.arch}} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: tarball-${{matrix.target}} | ||
path: dist/*.zip | ||
if-no-files-found: error | ||
- uses: taiki-e/install-action@v2 | ||
with: { tool: cargo-cache } | ||
- if: steps.cache-crates.outputs.cache-hit != 'true' | ||
run: cargo cache --autoclean | ||
e2e-linux: | ||
name: e2e-linux-${{matrix.tranche}} | ||
needs: [build-tarball] | ||
|
@@ -196,6 +250,7 @@ jobs: | |
- rpm | ||
- deb | ||
- e2e-linux | ||
- build-tarball-win | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -205,6 +260,15 @@ jobs: | |
repository: jdx/mise-docs | ||
path: mise-docs | ||
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN }} | ||
- name: cache zipsign | ||
id: cache-zipsign | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cargo/bin/zipsign | ||
key: cargo-zipsign | ||
- run: ./mise/scripts/setup-zipsign.sh | ||
env: | ||
ZIPSIGN: ${{ secrets.ZIPSIGN }} | ||
- name: Install fd-find | ||
run: | | ||
sudo apt-get update | ||
|
@@ -228,6 +292,16 @@ jobs: | |
workdir: mise-docs | ||
- uses: actions/download-artifact@v4 | ||
with: { path: artifacts } | ||
- run: ls -R artifacts | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
pattern: | | ||
mise-v*.tar.gz | ||
mise-v*.tar.xz | ||
mise-v*.zip | ||
merge-multiple: true | ||
- run: ls -R artifacts | ||
- run: mise/scripts/release.sh | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ jobs: | |
- run: | | ||
cargo build --all-features | ||
echo "$PWD/target/debug" >> "$GITHUB_PATH" | ||
- run: ${SCCACHE_PATH} --show-stats | ||
- run: mise install | ||
- run: mise x -- cargo nextest run --all-features | ||
- run: cargo deny check | ||
|
@@ -76,6 +75,7 @@ jobs: | |
author_email: [email protected] | ||
- uses: actions-rust-lang/rustfmt@v1 | ||
- run: mise run lint | ||
- run: ${SCCACHE_PATH} --show-stats | ||
|
||
nightly: | ||
runs-on: ubuntu-latest | ||
|
@@ -111,6 +111,7 @@ jobs: | |
push: true | ||
author_name: mise[bot] | ||
author_email: [email protected] | ||
- run: ${SCCACHE_PATH} --show-stats | ||
|
||
coverage: | ||
name: coverage-${{matrix.tranche}} | ||
|
@@ -168,6 +169,7 @@ jobs: | |
name: coverage-${{matrix.tranche}}.lcov | ||
path: coverage-${{matrix.tranche}}.lcov | ||
if-no-files-found: error | ||
- run: ${SCCACHE_PATH} --show-stats | ||
coverage-report: | ||
name: coverage-report | ||
runs-on: ubuntu-latest | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
target.x86_64-unknown-linux-gnu.pre-build = "./scripts/sccache.sh" | ||
target.x86_64-unknown-linux-musl.pre-build = "./scripts/sccache.sh" | ||
#target.aarch64-unknown-linux-gnu.pre-build = "./scripts/sccache.sh" | ||
#target.aarch64-unknown-linux-musl.pre-build = "./scripts/sccache.sh" | ||
#target.armv7-unknown-linux-gnueabihf.pre-build = "./scripts/sccache.sh" | ||
#target.armv7-unknown-linux-musleabihf.pre-build = "./scripts/sccache.sh" | ||
#target.arm-unknown-linux-gnueabi.pre-build = "./scripts/sccache.sh" | ||
#target.arm-unknown-linux-musleabi.pre-build = "./scripts/sccache.sh" | ||
#target.x86_64-apple-darwin.pre-build = "./scripts/sccache.sh" | ||
#target.aarch64-apple-darwin.pre-build = "./scripts/sccache.sh" | ||
#target.aarch64-pc-windows-msvc.pre-build = "./scripts/sccache.sh" | ||
#target.x86_64-pc-windows-msvc.pre-build = "./scripts/sccache.sh" | ||
|
||
[build.env] | ||
passthrough = [ | ||
"AWS_ACCESS_KEY_ID", | ||
"AWS_SECRET_ACCESS_KEY", | ||
"RUSTC_WRAPPER", | ||
"SCCACHE_BUCKET", | ||
"SCCACHE_DIR", | ||
"SCCACHE_ENDPOINT", | ||
"SCCACHE_ERROR_LOG", | ||
"SCCACHE_LOG", | ||
"SCCACHE_REGION", | ||
"SCCACHE_S3_NO_CREDENTIALS", | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Set-StrictMode -Version Latest | ||
#Set-PSDebug -Trace 1 | ||
|
||
$Target = $args[0] | ||
$Version = ./scripts/get-version.ps1 | ||
$BaseName = "mise-v$Version-$Env:OS-$Env:ARCH" | ||
|
||
cargo build --release --features openssl/vendored --target "$Target" | ||
mkdir -p dist/mise/bin | ||
cp "target/$Target/release/mise.exe" dist/mise/bin/mise.exe | ||
cp README.md dist/mise/README.md | ||
cp LICENSE dist/mise/LICENSE | ||
Compress-Archive -Path dist/mise -DestinationPath "dist/$BaseName.zip" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$Version = (Get-Content -Path Cargo.toml | Select-String -Pattern '^version = "(.*)"' | ForEach-Object { $_.Matches.Groups[1].Value }) | ||
Write-Output $Version |
Oops, something went wrong.