Debug messages #125
Workflow file for this run
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: release | |
on: push | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
cli-builds: | |
strategy: | |
matrix: | |
os: [ubuntu, windows, macos] | |
arch: [x86_64] | |
include: | |
- os: macos | |
arch: arm | |
triple: aarch64-apple-darwin | |
runs-on: ${{ format('{0}-latest', matrix.os) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
if: ${{ matrix.triple == null }} | |
- uses: dtolnay/rust-toolchain@stable | |
if: ${{ matrix.triple }} | |
with: | |
target: ${{ matrix.triple }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build artifacts (cross-compile) | |
if: ${{ matrix.triple }} | |
run: | | |
cargo build -p ncsu_exam_calendar_cli --release --config 'name="${{ matrix.arch }}-${{ matrix.os }}-ncsu_examc"' --target ${{ matrix.triple }} | |
- name: Build artifacts (windows) | |
if: ${{ matrix.triple == null && matrix.os == 'windows' }} | |
run: | | |
cargo build -p ncsu_exam_calendar_cli --release --config 'name=\"${{ matrix.arch }}-${{ matrix.os }}-ncsu_examc\"' | |
- name: Build artifacts | |
if: ${{ matrix.triple == null && matrix.os != 'windows' }} | |
run: | | |
cargo build -p ncsu_exam_calendar_cli --release --config 'name="${{ matrix.arch }}-${{ matrix.os }}-ncsu_examc"' | |
ls target | |
ls target/release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.arch }}-${{ matrix.os }}-cli | |
path: | | |
target/${{ matrix.triple }}/release/${{ matrix.arch }}-${{ matrix.os }}-ncsu_examc | |
target/release/${{ matrix.arch }}-${{ matrix.os }}-ncsu_examc | |
retention-days: 1 | |
gui-builds: | |
strategy: | |
matrix: | |
os: [ubuntu, windows, macos] | |
include: | |
- os: macos-latest | |
triple: aarch64-apple-darwin | |
runs-on: ${{ format('{0}-latest', matrix.os) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: awalsh128/cache-apt-pkgs-action@v1 | |
if: ${{ matrix.os == 'ubuntu' }} | |
with: | |
packages: binaryen \ | |
libwebkit2gtk-4.1-dev \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev | |
- name: Download dependencies (mac) | |
if: ${{ matrix.os == 'mac' }} | |
run: | | |
brew install binaryen | |
- name: Download dependencies (windows) | |
if: ${{ matrix.os == 'windows' }} | |
run: | | |
choco install sed | |
Set-ExecutionPolicy RemoteSigned -scope Process -Force | |
iex (new-object net.webclient).downloadstring('https://get.scoop.sh') | |
scoop install main/binaryen | |
- uses: dtolnay/rust-toolchain@stable | |
if: ${{ matrix.triple == null }} | |
- uses: dtolnay/rust-toolchain@stable | |
if: ${{ matrix.triple }} | |
with: | |
target: ${{ matrix.triple }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Download dioxus | |
run: | | |
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli | |
- name: Fix paths (windows) | |
if: ${{ matrix.os == 'windows' }} | |
run: | | |
sed -i 's;/;\\\\;g' desktop/Dioxus.toml # Filesystem paths... | |
- name: Build artifacts (cross-compile) | |
if: ${{ matrix.triple }} | |
run: | | |
dx bundle --bin ncsu_exam_calendar_desktop --release | |
- name: Build artifacts | |
if: ${{ matrix.triple == null }} | |
run: | | |
dx bundle --bin ncsu_exam_calendar_desktop --release --platform-triple '${{ matrix.triple }}' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.arch }}-${{ matrix.os }}-cli | |
path: | | |
desktop/dist/bundle/deb/*.deb | |
desktop/dist/bundle/appimage/*.AppImage | |
desktop/dist/bundle/macos/*.app | |
desktop/dist/bundle/dmg/*.dmg | |
desktop/dist/bundle/msi/*.msi | |
desktop/dist/bundle/nsis/*.exe | |
retention-days: 1 | |
release_info: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: RELEASE.txt | |
path: RELEASE.txt | |
retention-days: 1 | |
bundle: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [ | |
cli-builds, | |
gui-builds, | |
release_info | |
] | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Unpack directories | |
run: | | |
find -mindepth 1 -maxdepth 1 -type d -exec sh -c 'mv "$1"/* . && rmdir "$1"' shell {} \; | |
zip -r ncsu_exam_calendar_desktop.app.zip ncsu_exam_calendar_desktop.app | |
rm -rf ncsu_exam_calendar_desktop.app | |
- name: Calculate checksums | |
run: | | |
sha512sum * > sums.txt | |
- name: Move artifacts to subfolder | |
run: | | |
shopt -s extglob | |
mkdir artifacts | |
mv !(artifacts) artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
name: RELEASE.txt | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: artifacts/** | |
generate_release_notes: true | |
body_path: RELEASE.txt |