55 workflow_dispatch :
66
77jobs :
8- build :
8+ test :
9+ name : Test for ${{ matrix.os }}
910 runs-on : ${{ matrix.os }}
1011 strategy :
1112 matrix :
12- os : [ubuntu-latest, windows-latest, macos-latest]
13+ include :
14+ - os : ubuntu-latest
15+ artifact_name : astgen-linux
16+ - os : windows-latest
17+ artifact_name : astgen-win.exe
18+ - os : macos-latest
19+ artifact_name : astgen-macos
1320 steps :
1421 - name : Checkout
1522 uses : actions/checkout@v4
@@ -28,38 +35,38 @@ jobs:
2835 - name : Test
2936 run : |
3037 yarn test
31- - name : Create Windows Binaries
38+ - name : Create Windows binaries
3239 if : matrix.os == 'windows-latest'
3340 run : |
3441 node --experimental-sea-config sea-config.json
35- node -e "require('fs').copyFileSync(process.execPath, 'astgen-win.exe ')"
36- npx postject astgen-win.exe NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
37- - name : Create Linux Binaries
42+ node -e "require('fs').copyFileSync(process.execPath, '${{ matrix.artifact_name }} ')"
43+ npx postject ${{ matrix.artifact_name }} NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
44+ - name : Create Linux binaries
3845 if : matrix.os == 'ubuntu-latest'
3946 run : |
4047 node --experimental-sea-config sea-config.json
41- cp $(command -v node) astgen-linux
42- npx postject astgen-linux NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
43- - name : Create MacOS Binaries
48+ cp $(command -v node) ${{ matrix.artifact_name }}
49+ npx postject ${{ matrix.artifact_name }} NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
50+ - name : Create MacOS binaries
4451 if : matrix.os == 'macos-latest'
4552 run : |
4653 node --experimental-sea-config sea-config.json
47- cp $(command -v node) astgen-macos
48- codesign --remove-signature astgen-macos
49- npx postject astgen-macos NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --macho-segment-name NODE_SEA
50- codesign --sign - astgen-macos
54+ cp $(command -v node) ${{ matrix.artifact_name }}
55+ codesign --remove-signature ${{ matrix.artifact_name }}
56+ npx postject ${{ matrix.artifact_name }} NODE_SEA_BLOB sea-prep.blob --overwrite --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --macho-segment-name NODE_SEA
57+ codesign --sign - ${{ matrix.artifact_name }}
5158 - name : Print version and size (Windows)
5259 if : matrix.os == 'windows-latest'
5360 run : |
5461 Get-ChildItem -File | Select-Object Name,@{Name="Size(MB)";Expression={ "{0:N2}" -f ($_.Length/1MB) }} | Format-Table -AutoSize
55- .\astgen-win.exe --version
62+ echo "astgen version is:" $(.\${{ matrix.artifact_name }} --version)
5663 - name : Print version and size (Linux)
5764 if : matrix.os == 'ubuntu-latest'
5865 run : |
5966 ls -lh
60- ./astgen-linux --version
67+ echo "astgen version is:" $(./${{ matrix.artifact_name }} --version)
6168 - name : Print version and size (MacOS)
6269 if : matrix.os == 'macos-latest'
6370 run : |
6471 ls -lh
65- ./astgen-macos --version
72+ echo "astgen version is:" $(./${{ matrix.artifact_name }} --version)
0 commit comments