Skip to content

Commit 71b65d1

Browse files
authored
Merge pull request #7 from libplctag/prerelease
v0.1.2 - tweaks to the release workflow to ensure it actually runs.
2 parents 46b577c + 10f05c3 commit 71b65d1

File tree

9 files changed

+219
-24
lines changed

9 files changed

+219
-24
lines changed

.github/workflows/aarch64-apple-darwin.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,43 @@ name: aarch64-apple-darwin
33
on: [push, pull_request]
44

55
jobs:
6-
build-and-test:
6+
setup-aarch64-apple-darwin:
77
runs-on: macos-15
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Install dependencies
1111
run: brew install cmake
12-
- name: Build and Test
12+
13+
build-aarch64-apple-darwin:
14+
runs-on: macos-15
15+
needs: setup-aarch64-apple-darwin
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install dependencies
19+
run: brew install cmake
20+
- name: Configure
1321
run: |
1422
mkdir -p build && cd build
1523
cmake -G "Unix Makefiles" -DTARGET=aarch64-apple-darwin ..
16-
make -j$(sysctl -n hw.ncpu)
17-
ctest --output-on-failure
24+
- name: Build
25+
run: cd build && make -j$(sysctl -n hw.ncpu)
26+
- name: Upload build artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: build-aarch64-apple-darwin
30+
path: build/
31+
32+
test-aarch64-apple-darwin:
33+
runs-on: macos-15
34+
needs: build-aarch64-apple-darwin
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Download build artifacts
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: build-aarch64-apple-darwin
41+
path: build/
42+
- name: Restore execute permissions
43+
run: chmod +x build/bin/*
44+
- name: Run Tests
45+
run: cd build && ctest --output-on-failure

.github/workflows/aarch64-pc-linux-gnu.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,47 @@ name: aarch64-pc-linux-gnu
33
on: [push, pull_request]
44

55
jobs:
6-
build-and-test:
6+
setup-aarch64-pc-linux-gnu:
77
runs-on: ubuntu-24.04-arm
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Install dependencies
1111
run: |
1212
sudo apt-get update
1313
sudo apt-get install -y cmake build-essential
14-
- name: Build and Test
14+
15+
build-aarch64-pc-linux-gnu:
16+
runs-on: ubuntu-24.04-arm
17+
needs: setup-aarch64-pc-linux-gnu
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y cmake build-essential
24+
- name: Configure
1525
run: |
1626
mkdir -p build && cd build
1727
cmake -G "Unix Makefiles" -DTARGET=aarch64-pc-linux-gnu ..
18-
make -j$(nproc)
19-
ctest --output-on-failure
28+
- name: Build
29+
run: cd build && make -j$(nproc)
30+
- name: Upload build artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-aarch64-pc-linux-gnu
34+
path: build/
35+
36+
test-aarch64-pc-linux-gnu:
37+
runs-on: ubuntu-24.04-arm
38+
needs: build-aarch64-pc-linux-gnu
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Download build artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: build-aarch64-pc-linux-gnu
45+
path: build/
46+
- name: Restore execute permissions
47+
run: chmod +x build/bin/*
48+
- name: Run Tests
49+
run: cd build && ctest --output-on-failure

.github/workflows/aarch64-pc-windows-gnu.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,21 @@ name: aarch64-pc-windows-gnu
33
on: [push, pull_request]
44

55
jobs:
6+
setup-aarch64-pc-windows-gnu:
7+
runs-on: windows-11-arm
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Setup MinGW
11+
uses: msys2/setup-msys2@v2
12+
with:
13+
msystem: CLANGARM64
14+
update: true
15+
cache: true
16+
install: mingw-w64-clang-aarch64-toolchain mingw-w64-clang-aarch64-cmake
17+
618
build-aarch64-pc-windows-gnu:
719
runs-on: windows-11-arm
20+
needs: setup-aarch64-pc-windows-gnu
821
steps:
922
- uses: actions/checkout@v4
1023
- name: Setup MinGW

.github/workflows/release.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ on:
3131
- riscv64-musl-linux
3232
types:
3333
- completed
34-
branches:
35-
- release
3634

3735
permissions:
3836
contents: write
@@ -44,6 +42,13 @@ jobs:
4442
# Only run if the triggering workflow succeeded AND it ran on the release branch
4543
if: ${{ github.event.workflow_run.head_branch == 'release' && github.event.workflow_run.conclusion == 'success' }}
4644
steps:
45+
- name: Log trigger information
46+
run: |
47+
echo "Triggered by workflow: ${{ github.event.workflow_run.name }}"
48+
echo "Workflow status: ${{ github.event.workflow_run.conclusion }}"
49+
echo "Branch: ${{ github.event.workflow_run.head_branch }}"
50+
echo "Commit SHA: ${{ github.event.workflow_run.head_sha }}"
51+
4752
- name: Check all workflow statuses
4853
id: check-all
4954
uses: actions/github-script@v7
@@ -104,27 +109,42 @@ jobs:
104109
105110
const failed = [];
106111
const pending = [];
112+
const succeeded = [];
107113
108114
for (const name of target_workflows) {
109115
const run = latest_runs[name];
110-
if (!run || run.status !== 'completed') {
116+
if (!run) {
117+
console.log(` ${name}: NO RUN FOUND`);
118+
pending.push(name);
119+
} else if (run.status !== 'completed') {
120+
console.log(` ${name}: ${run.status}`);
111121
pending.push(name);
112122
} else if (run.conclusion !== 'success') {
123+
console.log(` ${name}: completed with ${run.conclusion}`);
113124
failed.push(name);
125+
} else {
126+
console.log(` ${name}: success`);
127+
succeeded.push(name);
114128
}
115129
}
116130
131+
console.log(`\nSummary: ${succeeded.length} succeeded, ${pending.length} pending, ${failed.length} failed`);
132+
117133
if (pending.length > 0) {
118-
console.log(`Waiting for other workflows to complete: ${pending.join(', ')}`);
134+
console.log(`Waiting for ${pending.length} workflows to complete: ${pending.join(', ')}`);
135+
core.setOutput("ready", "false");
136+
core.notice(`Release skipped: waiting for ${pending.length} workflows to complete`);
119137
return; // Exit successfully but do nothing; wait for next trigger
120138
}
121139
122140
if (failed.length > 0) {
123141
core.setFailed(`One or more workflows failed: ${failed.join(', ')}`);
142+
core.setOutput("ready", "false");
124143
return;
125144
}
126145
127146
console.log("All target workflows passed successfully!");
147+
core.notice("All required workflows passed - creating release");
128148
core.setOutput("ready", "true");
129149
130150
- name: Perform Release
@@ -136,7 +156,14 @@ jobs:
136156

137157
- name: Get Version
138158
if: steps.check-all.outputs.ready == 'true'
139-
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
159+
run: |
160+
if [ ! -f VERSION ]; then
161+
echo "ERROR: VERSION file not found"
162+
exit 1
163+
fi
164+
VERSION=$(cat VERSION)
165+
echo "Creating release for version: $VERSION"
166+
echo "VERSION=$VERSION" >> $GITHUB_ENV
140167
141168
- name: Get Release Details
142169
if: steps.check-all.outputs.ready == 'true'

.github/workflows/x86_64-apple-darwin.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,43 @@ name: x86_64-apple-darwin
33
on: [push, pull_request]
44

55
jobs:
6-
build-and-test:
6+
setup-x86_64-apple-darwin:
77
runs-on: macos-15-intel
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Install dependencies
1111
run: brew install cmake
12-
- name: Build and Test
12+
13+
build-x86_64-apple-darwin:
14+
runs-on: macos-15-intel
15+
needs: setup-x86_64-apple-darwin
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install dependencies
19+
run: brew install cmake
20+
- name: Configure
1321
run: |
1422
mkdir -p build && cd build
1523
cmake -G "Unix Makefiles" -DTARGET=x86_64-apple-darwin ..
16-
make -j$(sysctl -n hw.ncpu)
17-
ctest --output-on-failure
24+
- name: Build
25+
run: cd build && make -j$(sysctl -n hw.ncpu)
26+
- name: Upload build artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: build-x86_64-apple-darwin
30+
path: build/
31+
32+
test-x86_64-apple-darwin:
33+
runs-on: macos-15-intel
34+
needs: build-x86_64-apple-darwin
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Download build artifacts
38+
uses: actions/download-artifact@v4
39+
with:
40+
name: build-x86_64-apple-darwin
41+
path: build/
42+
- name: Restore execute permissions
43+
run: chmod +x build/bin/*
44+
- name: Run Tests
45+
run: cd build && ctest --output-on-failure

.github/workflows/x86_64-pc-linux-gnu.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,50 @@ name: x86_64-pc-linux-gnu
33
on: [push, pull_request]
44

55
jobs:
6-
build-and-test:
6+
setup-x86_64-pc-linux-gnu:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Install dependencies
1111
run: |
1212
sudo apt-get update
1313
sudo apt-get install -y cmake build-essential
14-
- name: Build and Test
14+
15+
build-x86_64-pc-linux-gnu:
16+
runs-on: ubuntu-latest
17+
needs: setup-x86_64-pc-linux-gnu
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y cmake build-essential
24+
- name: Configure
1525
run: |
1626
mkdir -p build && cd build
1727
cmake -G "Unix Makefiles" -DTARGET=x86_64-pc-linux-gnu -DENABLE_COVERAGE=ON ..
18-
make -j$(nproc)
19-
ctest --output-on-failure
28+
- name: Build
29+
run: cd build && make -j$(nproc)
30+
- name: Upload build artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-x86_64-pc-linux-gnu
34+
path: build/
35+
36+
test-x86_64-pc-linux-gnu:
37+
runs-on: ubuntu-latest
38+
needs: build-x86_64-pc-linux-gnu
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Download build artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: build-x86_64-pc-linux-gnu
45+
path: build/
46+
- name: Restore execute permissions
47+
run: chmod +x build/bin/*
48+
- name: Run Tests
49+
run: cd build && ctest --output-on-failure
2050
- name: Upload coverage to Codecov
2151
uses: codecov/codecov-action@v4
2252
with:

.github/workflows/x86_64-pc-windows-gnu.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,21 @@ name: x86_64-pc-windows-gnu
33
on: [push, pull_request]
44

55
jobs:
6+
setup-x86_64-pc-windows-gnu:
7+
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Setup MinGW
11+
uses: msys2/setup-msys2@v2
12+
with:
13+
msystem: MINGW64
14+
update: true
15+
cache: true
16+
install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
17+
618
build-x86_64-pc-windows-gnu:
719
runs-on: windows-latest
20+
needs: setup-x86_64-pc-windows-gnu
821
steps:
922
- uses: actions/checkout@v4
1023
- name: Setup MinGW

.github/workflows/x86_64-pc-windows-msvc.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ name: x86_64-pc-windows-msvc
33
on: [push, pull_request]
44

55
jobs:
6-
build-and-test:
6+
setup-x86_64-pc-windows-msvc:
77
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Setup MSVC
11+
uses: ilammy/msvc-dev-cmd@v1
12+
with:
13+
arch: x64
14+
15+
build-x86_64-pc-windows-msvc:
16+
runs-on: windows-latest
17+
needs: setup-x86_64-pc-windows-msvc
818
steps:
919
- uses: actions/checkout@v4
1020
- name: Setup MSVC
@@ -17,5 +27,21 @@ jobs:
1727
cmake -G "Ninja" -DTARGET=x86_64-pc-windows-msvc -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl ..
1828
- name: Build
1929
run: cmake --build build --config Release --parallel 4
20-
- name: Test
30+
- name: Upload build artifacts
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: build-x86_64-pc-windows-msvc
34+
path: build/
35+
36+
test-x86_64-pc-windows-msvc:
37+
runs-on: windows-latest
38+
needs: build-x86_64-pc-windows-msvc
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Download build artifacts
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: build-x86_64-pc-windows-msvc
45+
path: build/
46+
- name: Run Tests
2147
run: cd build && ctest --output-on-failure

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.1
1+
0.1.2

0 commit comments

Comments
 (0)