Bump actions/setup-java from 3 to 4 #66
This file contains hidden or 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
name: Rust | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build-rust.yml' | |
- 'rust-aoc/**' | |
env: | |
# Disable incremental compilation for faster from-scratch builds | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
type: ['', '--release'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get private repo | |
uses: actions/checkout@v4 | |
with: | |
repository: alien11689/advent-of-code | |
ref: master | |
token: ${{ secrets.ADVENT_OF_CODE_PAT}} | |
path: private | |
- name: Get files | |
run: | | |
mkdir -p rust-aoc/resources/2015 rust-aoc/resources/2023 rust-aoc/resources/2024 | |
cp -r private/2015/src/main/resources/* rust-aoc/resources/2015 | |
cp -r private/2023/src/main/resources/* rust-aoc/resources/2023 | |
cp -r private/2024/src/main/resources/* rust-aoc/resources/2024 | |
- name: Rust update | |
run: rustup update | |
- name: Test | |
run: | | |
cd rust-aoc | |
cargo test | |
- name: Run | |
run: | | |
cd rust-aoc | |
echo '```' > out | |
cargo run ${{matrix.type}} >> out | |
echo '```' >> out | |
cat out >> "$GITHUB_STEP_SUMMARY" |