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

build canary beta/nightly weekly #236

Merged
merged 3 commits 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
90 changes: 90 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'
push:
pull_request:

Expand Down Expand Up @@ -63,6 +65,94 @@ jobs:
with:
artifacts: ./rust-training-${{ env.slug }}.zip

build-slides-weekly-beta:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
steps:
- uses: actions/checkout@v4

- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: [email protected],[email protected]

- name: Add mdslides
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ferrous-systems/mdslides/releases/download/v0.5.0/mdslides-installer.sh | sh

- name: Add graphviz
run: |
sudo apt-get update -y && sudo apt-get install -y graphviz

- name: Update Beta Rust
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 book-and-slides
run: |
cd ./training-slides && ./build.sh

- name: Assemble Artifacts
run: |
echo "Making ./rust-training-${{ env.slug }}..."
mkdir -p ./rust-training-${{ env.slug }}
mv ./training-slides/slides ./rust-training-${{ env.slug }}/training-slides-presentation
mv ./training-slides/book ./rust-training-${{ env.slug }}/training-slides-book
cp -r ./example-code ./rust-training-${{ env.slug }}
echo "Compressing ./rust-training-${{ env.slug }}.zip..."
zip -r ./rust-training-${{ env.slug }}.zip ./rust-training-${{ env.slug }}

build-slides-weekly-nightly:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
steps:
- uses: actions/checkout@v4

- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: [email protected],[email protected]

- name: Add mdslides
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ferrous-systems/mdslides/releases/download/v0.5.0/mdslides-installer.sh | sh

- name: Add graphviz
run: |
sudo apt-get update -y && sudo apt-get install -y graphviz

- name: Update Nightly Rust
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 book-and-slides
run: |
cd ./training-slides && ./build.sh

- name: Assemble Artifacts
run: |
echo "Making ./rust-training-${{ env.slug }}..."
mkdir -p ./rust-training-${{ env.slug }}
mv ./training-slides/slides ./rust-training-${{ env.slug }}/training-slides-presentation
mv ./training-slides/book ./rust-training-${{ env.slug }}/training-slides-book
cp -r ./example-code ./rust-training-${{ env.slug }}
echo "Compressing ./rust-training-${{ env.slug }}.zip..."
zip -r ./rust-training-${{ env.slug }}.zip ./rust-training-${{ env.slug }}

build-examples-ferrocene:
runs-on: ubuntu-20.04
steps:
Expand Down