summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/actions/run-example-boost/action.yml1
-rw-r--r--.github/actions/run-example/action.yml2
-rw-r--r--.github/workflows/basic.yml16
-rw-r--r--test/examples/boost/run.ps124
4 files changed, 16 insertions, 27 deletions
diff --git a/.github/actions/run-example-boost/action.yml b/.github/actions/run-example-boost/action.yml
index f1fa81c..5384fd4 100644
--- a/.github/actions/run-example-boost/action.yml
+++ b/.github/actions/run-example-boost/action.yml
@@ -22,6 +22,7 @@ runs:
$name = 'foo' + (Get-ChildItem env:CI_EXE_EXT).Value
$path = Join-Path $install_dir 'bin' $name
+ $path = (Resolve-Path $path).Path
$actual = & $path $relative_test
diff --git a/.github/actions/run-example/action.yml b/.github/actions/run-example/action.yml
index 27210e9..46a6f90 100644
--- a/.github/actions/run-example/action.yml
+++ b/.github/actions/run-example/action.yml
@@ -20,7 +20,7 @@ runs:
if ((Get-ChildItem env:CI_TARGET_LINUX).Value) {
$lib = Join-Path $install_dir 'lib'
if (Test-Path $lib) {
- $lib = Resolve-Path $lib
+ $lib = (Resolve-Path $lib).Path
$env:LD_LIBRARY_PATH = $lib
}
}
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 2fd90d1..781b669 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -48,8 +48,14 @@ jobs:
- name: Build example project
run: |
python -m project.build --boost boost/ --install install/ -- test/examples/boost/ build/
+ - name: Set common variables
+ uses: $/.github/actions/common-variables
+ with:
+ toolset: auto
- name: Run example project
- run: ./test/examples/boost/run.ps1 ./install/bin/foo
+ uses: $/.github/actions/run-example-boost
+ with:
+ install_dir: install
# Check that the most basic use-case works w/ different Python versions.
python-versions:
@@ -97,5 +103,11 @@ jobs:
- name: Build example project
run: |
project-build --boost boost/ --install install/ -- test/examples/boost/ build/
+ - name: Set common variables
+ uses: $/.github/actions/common-variables
+ with:
+ toolset: auto
- name: Run example project
- run: ./test/examples/boost/run.ps1 ./install/bin/foo
+ uses: $/.github/actions/run-example-boost
+ with:
+ install_dir: install
diff --git a/test/examples/boost/run.ps1 b/test/examples/boost/run.ps1
deleted file mode 100644
index 578911f..0000000
--- a/test/examples/boost/run.ps1
+++ /dev/null
@@ -1,24 +0,0 @@
-param(
- [Parameter(Mandatory=$true)]
- [string] $FooPath
-)
-
-$foo_path = [System.IO.Path]::GetFullPath($FooPath)
-if ($IsWindows) {
- $foo_path += '.exe'
-}
-
-$relative = 'test.txt'
-$absolute = Join-Path (Get-Location).Path $relative
-
-$actual = & $foo_path $relative
-echo 'Actual output:'
-echo $actual
-
-$expected = $foo_path,$absolute
-echo 'Expected output:'
-echo $expected
-
-if (Compare-Object $actual $expected -CaseSensitive) {
- throw 'Unexpected output'
-}