mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 11:06:54 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d60b785c6f | ||
|
|
80da54fb1f | ||
|
|
2e39f09cda | ||
|
|
4106f361b2 | ||
|
|
1cc5cea014 | ||
|
|
8b0e8344b9 | ||
|
|
639d29024e | ||
|
|
ee4584ffbd | ||
|
|
013f11f99f |
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -7,17 +7,24 @@ on:
|
||||
- "master"
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 5
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- "1.0"
|
||||
- "lts"
|
||||
- "1" # automatically expands to the latest stable 1.x release of Julia
|
||||
- nightly
|
||||
- "pre"
|
||||
- "nightly"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-latest
|
||||
@@ -25,10 +32,22 @@ jobs:
|
||||
arch:
|
||||
- x64
|
||||
- x86
|
||||
- aarch64
|
||||
# 32-bit Julia binaries are not available on macOS
|
||||
# macOS runners use Apple Silicon (ARM64)
|
||||
exclude:
|
||||
- os: macOS-latest
|
||||
arch: x86
|
||||
- os: macOS-latest
|
||||
arch: x64
|
||||
- os: ubuntu-latest
|
||||
arch: aarch64
|
||||
- os: windows-latest
|
||||
arch: aarch64
|
||||
# Julia 1.0 didn't support ARM64
|
||||
- os: macOS-latest
|
||||
arch: aarch64
|
||||
version: "1.0"
|
||||
|
||||
steps:
|
||||
- name: Checkout Example.jl
|
||||
|
||||
21
.github/workflows/test_logger_ci.yml
vendored
21
.github/workflows/test_logger_ci.yml
vendored
@@ -7,17 +7,24 @@ on:
|
||||
- "master"
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 5
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- "1.6"
|
||||
- "lts"
|
||||
- "1" # automatically expands to the latest stable 1.x release of Julia
|
||||
- nightly
|
||||
- "pre"
|
||||
- "nightly"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macOS-latest
|
||||
@@ -25,10 +32,22 @@ jobs:
|
||||
arch:
|
||||
- x64
|
||||
- x86
|
||||
- aarch64
|
||||
# 32-bit Julia binaries are not available on macOS
|
||||
# macOS runners use Apple Silicon (ARM64)
|
||||
exclude:
|
||||
- os: macOS-latest
|
||||
arch: x86
|
||||
- os: macOS-latest
|
||||
arch: x64
|
||||
- os: ubuntu-latest
|
||||
arch: aarch64
|
||||
- os: windows-latest
|
||||
arch: aarch64
|
||||
# Julia 1.6 didn't support ARM64
|
||||
- os: macOS-latest
|
||||
arch: aarch64
|
||||
version: "1.6"
|
||||
|
||||
steps:
|
||||
- name: Checkout julia-runtest
|
||||
|
||||
@@ -25,8 +25,16 @@ if haskey(ENV, "GITHUB_SHA") && get(ENV, "GITHUB_EVENT_NAME", "") == "pull_reque
|
||||
|
||||
# Check if there's any difference between the merge commit and the PR head
|
||||
# In GitHub Actions, HEAD^2 is the PR head (second parent of merge commit)
|
||||
# success() returns true if the command exits with 0 (no differences)
|
||||
has_diff = !success(`git diff --quiet --exit-code HEAD^2 HEAD`)
|
||||
# First check if HEAD^2 exists (i.e., this is actually a merge commit)
|
||||
if success(`git rev-parse --verify --quiet HEAD^2`)
|
||||
# Compare tree hashes to check if content actually differs
|
||||
merge_tree = chomp(read(`git rev-parse HEAD^\{tree\}`, String))
|
||||
pr_tree = chomp(read(`git rev-parse HEAD^2^\{tree\}`, String))
|
||||
has_diff = merge_tree != pr_tree
|
||||
else
|
||||
# Not a merge commit, so no difference to report
|
||||
has_diff = false
|
||||
end
|
||||
|
||||
if has_diff
|
||||
base_branch = isempty(base_branch_name) ? "the base branch" : "'$base_branch_name'"
|
||||
|
||||
Reference in New Issue
Block a user