-
Notifications
You must be signed in to change notification settings - Fork 617
feat(binding/dart): add pubspec info #5751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f25ff04
add pubspec info
asukaminato0721 7398e1f
try add
asukaminato0721 6687e56
Update release_dart.yml
asukaminato0721 23f2f5b
support multi arch
asukaminato0721 6679081
pass the ci
asukaminato0721 613b4f7
try fix type
asukaminato0721 351dfb4
https://github.com/fzyzcjy/flutter_rust_bridge/issues/2460
asukaminato0721 e7d6545
fix path
asukaminato0721 146e95f
add log
asukaminato0721 26e32d3
put bin to pos
asukaminato0721 9de7604
Update opendal.dart
asukaminato0721 0d07086
dup key
asukaminato0721 0303b14
add build to default pos
asukaminato0721 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,127 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# This workflow is used for publish all rust based packages | ||
|
||
name: Release Dart | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ".github/workflows/release_dart.yml" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
target_suffix: x86_64 | ||
- os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
target_suffix: aarch64 | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
target_suffix: win_x86_64 | ||
- os: macos-latest | ||
target: aarch64-apple-darwin | ||
target_suffix: macos_aarch64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
bindings/dart/rust/target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ matrix.target }} # Include target in cache key | ||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install cross | ||
run: cargo install cross --git https://github.com/cross-rs/cross --force | ||
|
||
- name: Build on linux | ||
if: runner.os == 'Linux' | ||
run: | | ||
cd bindings/dart/rust | ||
cross build --release --target ${{ matrix.target }} | ||
|
||
- name: Build not on linux | ||
if: runner.os != 'Linux' | ||
run: | | ||
cd bindings/dart/rust | ||
cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Upload build artifact (per platform) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.target }} | ||
path: bindings/dart/rust/target/${{ matrix.target }}/release/*opendal* | ||
|
||
combine-artifacts: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: create release dir | ||
run: | | ||
cd bindings/dart/rust | ||
mkdir -p target/release/ | ||
|
||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
|
||
- name: Move artifacts to release | ||
run: | | ||
cp -av ./artifacts/* bindings/dart/rust/target/release/ | ||
find . -name "*.a" -print -delete | ||
find . -name "*.d" -print -delete | ||
find . -name "*.pdb" -print -delete | ||
find . -name "*.exp" -print -delete | ||
find . -name "*.lib" -print -delete | ||
- name: Show Result | ||
run: | | ||
cd bindings/dart/rust | ||
ls -R . | ||
- name: Upload combined build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: combined-release | ||
path: bindings/dart/rust/target/release/ | ||
# todo: add pub step |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should build only for RC tags and publish only for formal tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to modify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need something like
opendal/.github/workflows/release_python.yml
Line 117 in b8e778c
We can implement in next PR.