From 11d0f33a719a39c9cdf3ce6650e9ed992272f0e7 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 21 Nov 2024 17:32:12 -0500 Subject: [PATCH] Add toolchain file --- .github/workflows/release.yml | 61 ++++++++--------------------------- rust-toolchain.toml | 4 +++ 2 files changed, 17 insertions(+), 48 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abd168f..dd01fc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,16 @@ on: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + include: + - os: windows-latest + extension: .exe + runs-on: ${{ matrix.os }} steps: - name: Checkout sources uses: actions/checkout@v4 @@ -16,60 +25,16 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: linux - path: target/release/pbls + name: ${{ matrix.os }} + path: target/release/pbls${{ matrix.extension }} + if-no-files-found: error # publish: - # name: Publish # needs: [build] # runs-on: ubuntu-latest # steps: - # - name: Checkout sources - # uses: actions/checkout@v4 - # - uses: actions/download-artifact@v4 - # - name: Build archive - # shell: bash - # run: | - # set -ex - - # source="$(pwd)" - # mkdir -p runtime/grammars/sources - # tar xJf grammars/grammars.tar.xz -C runtime/grammars/sources - # rm -rf grammars - - # cd "$(mktemp -d)" - # mv $source/bins-* . - # mkdir dist - - # for dir in bins-* ; do - # platform=${dir#"bins-"} - # if [[ $platform =~ "windows" ]]; then - # exe=".exe" - # fi - # pkgname=helix-$GITHUB_REF_NAME-$platform - # mkdir -p $pkgname - # cp $source/LICENSE $source/README.md $pkgname - # mkdir $pkgname/contrib - # cp -r $source/contrib/completion $pkgname/contrib - # mv bins-$platform/runtime $pkgname/ - # mv bins-$platform/hx$exe $pkgname - # chmod +x $pkgname/hx$exe - - # if [[ "$platform" = "x86_64-linux" ]]; then - # mv bins-$platform/helix-*.AppImage* dist/ - # fi - - # if [ "$exe" = "" ]; then - # tar cJf dist/$pkgname.tar.xz $pkgname - # else - # 7z a -r dist/$pkgname.zip $pkgname - # fi - # done - - # tar cJf dist/helix-$GITHUB_REF_NAME-source.tar.xz -C $source . - # mv dist $source/ # - name: Upload binaries to release # uses: svenstaro/upload-release-action@v2 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..65db3e3 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "stable" +components = ["rustfmt", "rust-src", "clippy"] +