Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build run weekly on mondays, skip if in PR #155

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build sample material

on:
schedule:
- cron: '0 0 * * Mon' # Run this job weekly, on Monday midnights
push:
pull_request:

Expand Down Expand Up @@ -52,3 +54,75 @@ jobs:
artifacts: "./rust-exercises-${{ env.slug }}.zip,./rust-exercises-${{ env.slug }}/nrf52-code/boards/dongle-fw/*-fw"
allowUpdates: true
updateOnlyUnreleased: true

build-weekly-beta:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4

- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: mdslides@0.3,mdbook@0.4,mdbook-mermaid@0.12,flip-link@0.1.7

- name: Install targets
run: |
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt

- name: Update Beta
run: |
rustup update beta
rustup default beta

- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"

- name: Build and test
env: # Or as an environment variable
HIDDEN_MESSAGE: ${{ secrets.HIDDEN_MESSAGE }}
run: |
./build.sh "./rust-exercises-${{ env.slug }}"

build-weekly-nightly:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4

- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: mdslides@0.3,mdbook@0.4,mdbook-mermaid@0.12,flip-link@0.1.7

- name: Install targets
run: |
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt

- name: Update Nightly
run: |
rustup update nightly
rustup default nightly

- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"

- name: Build and test
env: # Or as an environment variable
HIDDEN_MESSAGE: ${{ secrets.HIDDEN_MESSAGE }}
run: |
./build.sh "./rust-exercises-${{ env.slug }}"