forked from Wilfred/difftastic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sort JSON lines and enrich them * Fix release.yml * Slimmer testing * Cargo fmt * actionlint * Less testing * Replace map with list to preserve order --------- Co-authored-by: Nimrod <[email protected]> Replace map with list to preserve order Replace map with list to preserve order
- Loading branch information
Showing
7 changed files
with
36 additions
and
114 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
on: [push, pull_request] | ||
on: [ push, pull_request ] | ||
|
||
name: Continuous integration | ||
|
||
|
@@ -10,65 +10,24 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
job: | ||
# Operating systems available: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | ||
- { target: x86_64-unknown-linux-gnu, os: ubuntu-20.04 } | ||
# mac-latest (currently mac-14) is an ARM device, so use macos-12 to get Intel. | ||
# Update annoucement: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/ | ||
- { target: x86_64-apple-darwin, os: macos-12 } | ||
- { target: x86_64-pc-windows-msvc, os: windows-latest } | ||
|
||
- { target: aarch64-unknown-linux-gnu, os: ubuntu-20.04, use-cross: true } | ||
|
||
# mac-14 is an M1 ARM device. | ||
- { target: aarch64-apple-darwin, os: macos-14 } | ||
|
||
# musl binaries produced by GitHub actions segfault when run, see | ||
# https://github.com/Wilfred/difftastic/issues/563 | ||
# | ||
# musl builds seem to work fine elsewhere, so just verify | ||
# that compilation works for now. | ||
- { target: x86_64-unknown-linux-musl, os: ubuntu-20.04, use-cross: true, build-only: true } | ||
env: | ||
BUILD_CMD: cargo | ||
SUBCOMMAND: test | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/[email protected] | ||
with: | ||
targets: ${{ matrix.job.target }} | ||
|
||
- name: Install cross | ||
if: matrix.job.use-cross | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: [email protected] | ||
|
||
- name: Overwrite build command env variable | ||
if: matrix.job.use-cross | ||
shell: bash | ||
run: echo "BUILD_CMD=cross" >> $GITHUB_ENV | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Overwrite build subcommand env variable | ||
if: matrix.job.build-only | ||
shell: bash | ||
run: echo "SUBCOMMAND=build" >> $GITHUB_ENV | ||
- name: Install Rust toolchain | ||
uses: dtolnay/[email protected] | ||
with: | ||
targets: ${{ matrix.job.target }} | ||
|
||
- name: Test | ||
shell: bash | ||
run: $BUILD_CMD $SUBCOMMAND --target ${{ matrix.job.target }} | ||
|
||
test_mime_db: | ||
name: Test with MIME database | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/[email protected] | ||
# This runs tests that rely on the MIME database being present. | ||
- run: cargo test -- --ignored | ||
- name: Test | ||
shell: bash | ||
run: $BUILD_CMD $SUBCOMMAND --target ${{ matrix.job.target }} | ||
|
||
test_linux_latest_stable: | ||
name: Test Linux (latest stable Rust) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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