-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unit tests for aarch64 architetures (#54)
tome unit tests we're not working for aarch64, which seem to due to Python's availability on each platform. Expanding the workflow file with help from @zph to expand testing surface.
- Loading branch information
1 parent
f8233b8
commit 944b3e2
Showing
6 changed files
with
82 additions
and
91 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,68 @@ | ||
name: Build and Release | ||
on: | ||
# # Indicates I want to run this workflow on all branches, PR, and tags | ||
push: | ||
branches: ["*"] | ||
tags: ["*"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
env: | ||
BIN_NAME: "tome" | ||
CRATE_NAME: tome | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- os_name: Linux-x86_64 | ||
os: ubuntu-20.04 | ||
target: x86_64-unknown-linux-musl | ||
bin: tome | ||
name: tome-linux-x86_64 | ||
- os_name: Linux-aarch64 | ||
os: ubuntu-20.04 | ||
target: aarch64-unknown-linux-musl | ||
bin: tome | ||
name: tome-linux-aarch64 | ||
- os_name: macOS-x86_64 | ||
os: macOS-latest | ||
target: x86_64-apple-darwin | ||
bin: tome | ||
name: tome-darwin-x86_64 | ||
- os_name: macOS-aarch64 | ||
os: macOS-latest | ||
target: aarch64-apple-darwin | ||
bin: tome | ||
name: tome-darwin-aarch64 | ||
# The action does not support running tests on aarch64-apple-darwin. | ||
# https://github.com/houseabsolute/actions-rust-cross?tab=readme-ov-file#input-parameters | ||
skip_tests: true | ||
toolchain: | ||
- stable | ||
- beta | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install musl-tools on Linux | ||
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | ||
if: contains(matrix.platform.name, 'musl') | ||
- name: Build binary | ||
uses: houseabsolute/[email protected] | ||
with: | ||
command: "build" | ||
target: ${{ matrix.platform.target }} | ||
toolchain: ${{ matrix.toolchain }} | ||
args: "--locked --release" | ||
strip: true | ||
- name: Run tests | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: "test" | ||
target: ${{ matrix.platform.target }} | ||
toolchain: ${{ matrix.toolchain }} | ||
args: "--locked --release" | ||
if: ${{ !matrix.platform.skip_tests }} |
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 |
---|---|---|
@@ -1,17 +1,23 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env bash | ||
# SUMMARY: hey' | ||
# COMPLETE | ||
# START HELP | ||
# this is an example of a simple script written in python. | ||
# END HELP | ||
import sys | ||
#import sys | ||
|
||
# when attempting to complete a variable, | ||
# --complete will be passed, with the full argument set. | ||
# for example, | ||
# $ cb file_example foo a --complete | ||
# will pass all arguments (the "a" should be autocompleted.) | ||
if len(sys.argv) > 1 and sys.argv[1] == "--complete": | ||
sys.stdout.write("file autocomplete example") | ||
else: | ||
print("hello") | ||
if [ "${1}" == "--complete" ]; then | ||
echo -n "file autocomplete example" | ||
else | ||
echo "hello" | ||
fi | ||
|
||
#if len(sys.argv) > 1 and sys.argv[1] == "--complete": | ||
# sys.stdout.write("file autocomplete example") | ||
#else: | ||
# print("hello") |
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