Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
zyma98 committed Jun 19, 2024
1 parent 2c66c5d commit 3bd7935
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 62 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/actions/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ runs:
- name: Build test "hello world"
run: cargo +segstk-rust build --release --example hello_world
shell: bash

- name: Upload test "hello world"
uses: actions/upload-artifact@v4
with:
name: hello_world
path: ./target/thumbv7em-none-eabihf/release/examples/hello_world
28 changes: 28 additions & 0 deletions .github/workflows/actions/test-hello-world/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Hello World Test
description: "Run hello world test."

inputs:
cookie:
description: "Cookie for download authorization."
required: true

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Prepare QEMU
uses: ./.github/workflows/actions/prepare-qemu
with:
cookie: ${{ inputs.cookie }}

- name: Download test "hello world"
uses: actions/download-artifact@v4
with:
name: hello_world
path: hello_world

- name: Run test "hello world"
run: qemu-system-arm -machine netduinoplus2 -nographic -semihosting-config enable=on,target=native -kernel hello_world
shell: bash
34 changes: 0 additions & 34 deletions .github/workflows/build.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/check-rust-toolchain.yaml

This file was deleted.

11 changes: 10 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: qemu-system-arm --version
shell: bash

build-test:
build:
runs-on: ubuntu-latest
needs: [check-qemu, check-rust-toolchain]
steps:
Expand All @@ -47,3 +47,12 @@ jobs:
uses: ./.github/workflows/actions/build
with:
cookie: ${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}

test-hello-world:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Run test "hello world"
uses: ./.github/workflows/actions/test-hello-world
with:
cookie: ${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}
File renamed without changes.

0 comments on commit 3bd7935

Please sign in to comment.