Build #62
This file contains 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: Build nightly | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * *" | |
jobs: | |
check-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
should_run: ${{ steps.should_run.outputs.should_run }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: should_run | |
continue-on-error: true | |
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "should_run=false" >> "$GITHUB_OUTPUT" | |
build-dummy: | |
runs-on: windows-latest | |
needs: check-changes | |
if: ${{ needs.check-changes.outputs.should_run != 'false' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install meson | |
run: python -m pip install meson ninja | |
- name: Setup | |
working-directory: dummy-service | |
run: meson setup build | |
- name: Build | |
working-directory: dummy-service | |
run: meson compile -C build | |
- name: Move files | |
working-directory: dummy-service | |
run: move build/*.exe . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dummy-GalaxyCommunication.exe | |
path: dummy-service/*.exe | |
build: | |
strategy: | |
matrix: | |
target: | |
[ | |
x86_64-unknown-linux-gnu, | |
aarch64-unknown-linux-gnu, | |
x86_64-apple-darwin, | |
aarch64-apple-darwin, | |
x86_64-pc-windows-msvc, | |
aarch64-pc-windows-msvc, | |
] | |
runs-on: ${{ (contains(matrix.target, 'apple-darwin') && 'macos-latest') || | |
(contains(matrix.target, 'linux-gnu') && 'ubuntu-latest') || | |
(contains(matrix.target, 'pc-windows') && 'windows-latest') }} | |
needs: build-dummy | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
name: Install arm gcc | |
run: sudo apt install gcc-aarch64-linux-gnu | |
- name: Setup target | |
run: rustup target add ${{ matrix.target }} | |
- name: Build | |
run: cargo build --verbose --release --target ${{ matrix.target }} | |
- name: Downloading dummy service for packaging | |
uses: actions/download-artifact@v4 | |
with: | |
name: dummy-GalaxyCommunication.exe | |
path: dummy-service | |
- name: Generic packaging | |
uses: actions/upload-artifact@v4 | |
with: | |
name: comet-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/release/comet* | |
!target/${{ matrix.target }}/release/comet.d | |
dummy-service/ | |
!dummy-service/*.c | |
${{ contains(matrix.target, 'linux-gnu') && 'docs/steamdeck' }} |