-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5565988
Showing
14 changed files
with
1,623 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [lukas-reineke] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'cargo' | ||
directory: '/' | ||
schedule: | ||
interval: 'monthly' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Pull request check | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
block-fixup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Block Fixup Commit Merge | ||
uses: 13rac1/block-fixup-merge-action@v2.0.0 | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | ||
- run: cargo build --verbose | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- run: rustup update stable && rustup default stable | ||
- run: rustup component add rustfmt | ||
- run: cargo fmt --all -- --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: upload | ||
|
||
# copied from https://github.com/rust-lang/rustfmt/blob/master/.github/workflows/upload-assets.yml | ||
|
||
on: | ||
push: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-release: | ||
name: build-release | ||
strategy: | ||
matrix: | ||
build: | ||
[linux-x86_64, macos-x86_64, windows-x86_64-gnu, windows-x86_64-msvc] | ||
include: | ||
- build: linux-x86_64 | ||
os: ubuntu-latest | ||
rust: nightly | ||
target: x86_64-unknown-linux-gnu | ||
- build: macos-x86_64 | ||
os: macos-latest | ||
rust: nightly | ||
target: x86_64-apple-darwin | ||
- build: windows-x86_64-gnu | ||
os: windows-latest | ||
rust: nightly-x86_64-gnu | ||
target: x86_64-pc-windows-gnu | ||
- build: windows-x86_64-msvc | ||
os: windows-latest | ||
rust: nightly-x86_64-msvc | ||
target: x86_64-pc-windows-msvc | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Run build | ||
- name: install rustup | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
- name: Add mingw64 to path for x86_64-gnu | ||
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH | ||
if: matrix.rust == 'nightly-x86_64-gnu' | ||
shell: bash | ||
|
||
- name: Build release binaries | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
|
||
- name: Build archive | ||
shell: bash | ||
run: | | ||
staging="cbfmt_${{ matrix.build }}_${{ github.event.release.tag_name }}" | ||
mkdir -p "$staging" | ||
cp {README.md,LICENSE.md} "$staging/" | ||
if [ "${{ matrix.os }}" = "windows-latest" ]; then | ||
cp target/release/cbfmt.exe "$staging/" | ||
7z a "$staging.zip" "$staging" | ||
echo "ASSET=$staging.zip" >> $GITHUB_ENV | ||
else | ||
cp target/release/cbfmt "$staging/" | ||
tar czf "$staging.tar.gz" "$staging" | ||
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV | ||
fi | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Oops, something went wrong.