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 40d8541 commit 976e57d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/actions/prepare-qemu/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Prepare QEMU
description: "Download QEMU and add it to PATH."

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

runs:
using: "composite"
steps:
Expand All @@ -15,7 +20,7 @@ runs:
if: steps.qemu-cache.outputs.cache-hit != 'true'
run: >
curl --fail -L
--cookie "authorized_cookie=${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}"
--cookie "authorized_cookie=${{ inputs.cookie }}"
-o qemu.tar.xz
'https://file.zyma.me/qemu.tar.xz'
shell: bash
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/actions/prepare-rust-toolchain/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Prepare Rust toolchain
description: "Download and register Rust compiler toolchain."

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

runs:
using: "composite"
steps:
Expand All @@ -15,7 +20,7 @@ runs:
if: steps.rust-cache.outputs.cache-hit != 'true'
run: >
curl --fail -L
--cookie "authorized_cookie=${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}"
--cookie "authorized_cookie=${{ inputs.cookie }}"
-o rust.tar.xz
'https://file.zyma.me/rust.tar.xz'
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ jobs:

- name: Prepare Rust compiler toolchain
uses: ./.github/workflows/actions/prepare-rust-toolchain
with:
cookie: ${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}

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

- name: Build Hopter
run: cargo +segstk-rust build --release
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/check-qemu.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Check QEMU

on:
workflow_call:
secrets:
TEST_COOKIE:
required: true
on: [workflow_call]

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,13 +12,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Test secret
run: echo ${{ secrets.TEST_COOKIE }}
shell: bash

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

- name: Verify QEMU
run: qemu-system-arm --version
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-rust-toolchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Prepare Rust compiler toolchain
uses: ./.github/workflows/actions/prepare-rust-toolchain
with:
cookie: ${{ secrets.AUTHORIZED_DOWNLOAD_COOKIE }}

- name: Verify Rust compiler toolchain registration
run: cargo +segstk-rust --version
Expand Down

0 comments on commit 976e57d

Please sign in to comment.