mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 01:15:42 -06:00
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
103 lines
2.9 KiB
YAML
103 lines
2.9 KiB
YAML
name: Builds
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Build (${{ matrix.target }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
artifact_name: pacman
|
|
toolchain: 1.86.0
|
|
- os: macos-15-intel
|
|
target: x86_64-apple-darwin
|
|
artifact_name: pacman
|
|
toolchain: 1.86.0
|
|
- os: macos-15
|
|
target: aarch64-apple-darwin
|
|
artifact_name: pacman
|
|
toolchain: 1.86.0
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-gnu
|
|
artifact_name: pacman.exe
|
|
toolchain: 1.86.0
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Get vcpkg baseline
|
|
id: vcpkg_version
|
|
shell: bash
|
|
run: |
|
|
VCPKG_REV=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "pacman") | .metadata.vcpkg.rev // "unknown"')
|
|
echo "version=$VCPKG_REV" >> $GITHUB_OUTPUT
|
|
working-directory: pacman
|
|
|
|
- name: Cache vcpkg
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
target/vcpkg
|
|
~/.cargo/bin/cargo-vcpkg
|
|
key: vcpkg-${{ steps.vcpkg_version.outputs.version }}-${{ runner.os }}-${{ matrix.target }}
|
|
restore-keys: |
|
|
vcpkg-${{ steps.vcpkg_version.outputs.version }}-${{ runner.os }}-
|
|
|
|
- name: Vcpkg Linux Dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libltdl-dev
|
|
|
|
- name: Setup vcpkg
|
|
shell: bash
|
|
run: |
|
|
cargo install cargo-vcpkg
|
|
cargo vcpkg -v build
|
|
echo "VCPKG_ROOT=${{ github.workspace }}/target/vcpkg" >> $GITHUB_ENV
|
|
working-directory: pacman
|
|
|
|
- name: Build
|
|
run: cargo build --release
|
|
working-directory: pacman
|
|
|
|
- name: Acquire Package Version
|
|
id: get_version
|
|
shell: bash # required to prevent Windows runners from failing
|
|
run: |
|
|
set -euo pipefail # exit on error
|
|
echo "version=$(cargo metadata --format-version 1 --no-deps | jq '.packages[0].version' -r)" >> $GITHUB_OUTPUT
|
|
working-directory: pacman
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: "pacman-${{ steps.get_version.outputs.version }}-${{ matrix.target }}"
|
|
path: ./target/release/${{ matrix.artifact_name }}
|
|
retention-days: 7
|
|
if-no-files-found: error
|