-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testing on Windows, macOS, and R 4.2 (#545)
* Explore testing on windows * Don't need `r-base-dev`, right? * Fix typo * I think `cargo build` before `cargo test` is redundant? * Write in binary mode to ensure `eol` is respected on Windows * Ensure file is closed before getting file size * Can it even roundtrip correctly? * Did it get into R right? * See if `&str` to `RObject` loses encoding * What is the encoding? * What about the windows version? * make sure build.rs is actually being called * panic after to get stderr output * Remove panic * does this happen to work? * what does an integration test report? * Use `compile_for_everything()` to embed the manifest in the test binary And also do this for the harp test binary, which starts R and tests UTF-8 related capabilities. * Try removing some extra installs * Create unified `test.yml` * Make the subworkflows callable * Add script to auto generate the manifest files * Post rebase fixup * Only test on nightly on 1 OS, also test on R 4.2 * Less repetition * Add in macOS testing * An `origin` is required on R <= 4.2 for `as.POSIXct.numeric()` * Looks better without this too * Allow SSH access on workflow dispatch * Try and get some information on where `recv()` is hanging * Send timeout too * Remove timeout code for the moment * Install R packages for tests * Add a note on the application manifest * Reference manifest files * It's `r_task()` everywhere now
- Loading branch information
1 parent
1e8aae4
commit 81e72f4
Showing
22 changed files
with
473 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
name: "Test Ark - Linux" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
inputs: | ||
ssh: | ||
description: 'Set up an SSH session before running `cargo test`?' | ||
type: boolean | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
name: "Rust: ${{ matrix.config.rust }}, R: ${{ matrix.config.r }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { rust: 'stable', r: 'release' } | ||
# Oldest supported R version | ||
- { rust: 'stable', r: '4.2' } | ||
# Nightly rust | ||
- { rust: 'nightly', r: 'release' } | ||
timeout-minutes: 30 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: dtolnay/rust-toolchain@nightly | ||
if: matrix.config.rust == 'nightly' | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: true | ||
|
||
- name: Install R Packages Required For Tests | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
packages: | ||
data.table | ||
tibble | ||
|
||
- name: Setup Build Environment | ||
run: | | ||
sudo apt-get update | ||
- name: Setup SSH access | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ inputs.ssh }} | ||
timeout-minutes: 30 | ||
|
||
- name: Run Unit Tests | ||
id: test | ||
run: | | ||
cargo test --verbose |
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,38 @@ | ||
name: "Test Ark - macOS" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
macos: | ||
runs-on: macos-latest | ||
name: "Rust: ${{ matrix.config.rust }}, R: ${{ matrix.config.r }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { rust: 'stable', r: 'release' } | ||
timeout-minutes: 30 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: true | ||
|
||
- name: Install R Packages Required For Tests | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
packages: | ||
data.table | ||
tibble | ||
|
||
- name: Run Unit Tests | ||
id: test | ||
run: | | ||
cargo test --verbose |
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,38 @@ | ||
name: "Test Ark - Windows" | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
windows: | ||
runs-on: windows-latest | ||
name: "Rust: ${{ matrix.config.rust }}, R: ${{ matrix.config.r }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { rust: 'stable', r: 'release' } | ||
timeout-minutes: 30 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: true | ||
|
||
- name: Install R Packages Required For Tests | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
packages: | ||
data.table | ||
tibble | ||
|
||
- name: Run Unit Tests | ||
id: test | ||
run: | | ||
cargo test --verbose |
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,23 @@ | ||
name: "Test Ark" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test_macos: | ||
name: Test macOS | ||
uses: ./.github/workflows/test-macos.yml | ||
secrets: inherit | ||
|
||
test_windows: | ||
name: Test Windows | ||
uses: ./.github/workflows/test-windows.yml | ||
secrets: inherit | ||
|
||
test_linux: | ||
name: Test Linux | ||
uses: ./.github/workflows/test-linux.yml | ||
secrets: inherit |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.