forked from Foundation-Devices/tor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'cargokit/' changes from 52b2251..62bb5c9
62bb5c9 chore: test iOS flavor and nightly for release build (#20) fa301d5 fix: [android] specify compiler extension on windows (#22) 98f6e01 feat: allow configuring verbose mode through CARGOKIT_VERBOSE env (#21) 6d421f9 chore: add CI test for building example plugin (#17) 1f644b2 feat: add workaround for pub path resolving bug (#19) c1e8fcf fix: script argument escaping (#18) 34cc336 Merge pull request #16 from irondash/build_configuraiton_parse_ignore_flavor be425f7 fix: parsing configuration should ignore flavor 32b6720 Merge pull request #15 from irondash/fix_pod_dylib_bundle_replacement bfd4bcc fix: [pod] exception when building bundle dylib git-subtree-dir: cargokit git-subtree-split: 62bb5c9b6c9b3eca1071baf78606bc7f43632133
- Loading branch information
1 parent
d4e7d4a
commit 545a2bc
Showing
11 changed files
with
177 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Test Example Plugin | ||
|
||
jobs: | ||
Build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
build_mode: | ||
- debug | ||
- profile | ||
- release | ||
env: | ||
EXAMPLE_DIR: "a b/hello_rust_ffi_plugin/example" | ||
CARGOKIT_VERBOSE: 1 | ||
steps: | ||
- name: Extract branch name | ||
shell: bash | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
id: extract_branch | ||
- name: Setup Repository | ||
shell: bash | ||
run: | | ||
mkdir "a b" # Space is intentional | ||
cd "a b" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
# "advanced" branch has extra iOS flavor and uses rust nightly for release builds | ||
git clone -b advanced https://github.com/irondash/hello_rust_ffi_plugin | ||
cd hello_rust_ffi_plugin | ||
git subtree pull --prefix cargokit https://github.com/irondash/cargokit.git ${{ steps.extract_branch.outputs.branch }} --squash | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
- name: Install GTK | ||
if: (matrix.os == 'ubuntu-latest') | ||
run: sudo apt-get update && sudo apt-get install libgtk-3-dev | ||
- name: Install ninja-build | ||
if: (matrix.os == 'ubuntu-latest') | ||
run: sudo apt-get update && sudo apt-get install ninja-build | ||
- name: Build Linux (${{ matrix.build_mode }}) | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: flutter build linux --${{ matrix.build_mode }} -v | ||
- name: Build macOS (${{ matrix.build_mode }}) | ||
if: matrix.os == 'macos-latest' | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: flutter build macos --${{ matrix.build_mode }} -v | ||
- name: Build iOS (${{ matrix.build_mode }}) | ||
if: matrix.os == 'macos-latest' | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: flutter build ios --${{ matrix.build_mode }} --no-codesign -v | ||
- name: Build iOS (${{ matrix.build_mode }}) - flavor1 | ||
if: matrix.os == 'macos-latest' | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: flutter build ios --flavor flavor1 --${{ matrix.build_mode }} --no-codesign -v | ||
- name: Build Windows (${{ matrix.build_mode }}) | ||
if: matrix.os == 'windows-latest' | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: flutter build windows --${{ matrix.build_mode }} -v | ||
- name: Build Android (${{ matrix.build_mode }}) | ||
shell: bash | ||
working-directory: ${{ env.EXAMPLE_DIR }} | ||
run: | | ||
export JAVA_HOME=$JAVA_HOME_11_X64 | ||
flutter build apk --${{ matrix.build_mode }} -v | ||
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
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
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,28 @@ | ||
import 'package:build_tool/src/builder.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('parseBuildConfiguration', () { | ||
var b = BuildEnvironment.parseBuildConfiguration('debug'); | ||
expect(b, BuildConfiguration.debug); | ||
|
||
b = BuildEnvironment.parseBuildConfiguration('profile'); | ||
expect(b, BuildConfiguration.profile); | ||
|
||
b = BuildEnvironment.parseBuildConfiguration('release'); | ||
expect(b, BuildConfiguration.release); | ||
|
||
b = BuildEnvironment.parseBuildConfiguration('debug-dev'); | ||
expect(b, BuildConfiguration.debug); | ||
|
||
b = BuildEnvironment.parseBuildConfiguration('profile'); | ||
expect(b, BuildConfiguration.profile); | ||
|
||
b = BuildEnvironment.parseBuildConfiguration('profile-prod'); | ||
expect(b, BuildConfiguration.profile); | ||
|
||
// fallback to release | ||
b = BuildEnvironment.parseBuildConfiguration('unknown'); | ||
expect(b, BuildConfiguration.release); | ||
}); | ||
} |
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,27 @@ | ||
function Resolve-Symlinks { | ||
[CmdletBinding()] | ||
[OutputType([string])] | ||
param( | ||
[Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] | ||
[string] $Path | ||
) | ||
|
||
[string] $separator = '/' | ||
[string[]] $parts = $Path.Split($separator) | ||
|
||
[string] $realPath = '' | ||
foreach ($part in $parts) { | ||
if ($realPath -and !$realPath.EndsWith($separator)) { | ||
$realPath += $separator | ||
} | ||
$realPath += $part | ||
$item = Get-Item $realPath | ||
if ($item.Target) { | ||
$realPath = $item.Target.Replace('\', '/') | ||
} | ||
} | ||
$realPath | ||
} | ||
|
||
$path=Resolve-Symlinks -Path $args[0] | ||
Write-Host $path |
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