Skip to content

Commit ce02809

Browse files
committed
Download latest fasmg instead of copying executable from repo.
1 parent a214806 commit ce02809

File tree

1 file changed

+42
-27
lines changed

1 file changed

+42
-27
lines changed

.github/workflows/make.yml

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ jobs:
2222
- name: Prepare Build Environment
2323
run: cmake -E echo >> $${{env.ENV}}GITHUB_PATH ${{github.workspace}}/CEdev/bin
2424
- name: Prepare Build Environment
25-
if: runner.os == 'Windows'
26-
run: cmake -E echo >> $${{env.ENV}}GITHUB_ENV EXE=.exe
27-
28-
- name: Install Build Dependencies
29-
if: runner.os == 'Linux'
30-
run: sudo apt-get install -y doxygen
31-
- name: Install Build Dependencies
3225
if: runner.os == 'macOS'
33-
run: brew install doxygen
26+
run: cmake -E echo >> $${{env.ENV}}GITHUB_ENV FASMG_PATH=/source/macos/x64
27+
- name: Prepare Build Environment
28+
if: runner.os != 'Windows'
29+
run: cmake -E echo >> $${{env.ENV}}GITHUB_ENV NUL=/dev/null
30+
- name: Prepare Build Environment
31+
if: runner.os == 'Windows'
32+
run: |
33+
cmake -E echo >> $${{env.ENV}}GITHUB_ENV NUL=nul
34+
cmake -E echo >> $${{env.ENV}}GITHUB_ENV EXE=.exe
3435
3536
- name: Download ez80-clang
3637
id: ez80-clang
@@ -42,32 +43,46 @@ jobs:
4243
with:
4344
pathSource: ${{steps.ez80-clang.outputs.file-path}}
4445
pathTarget: CEdev/bin
45-
- name: Make ez80-clang Executable
46+
47+
- name: Download Fasmg Download Page
48+
id: flatassembler-download
49+
uses: carlosperate/download-file-action@v1.0.3
50+
with:
51+
file-url: https://flatassembler.net/download.php
52+
- name: Parse Fasmg Download Page
53+
id: fasmg-url
54+
uses: QwerMike/xpath-action@v1
55+
with:
56+
filename: ${{steps.flatassembler-download.outputs.file-path}}
57+
expression: //a[starts-with(text(),"flat assembler g ")]/@href
58+
- name: Extract Fasmg Url
59+
run: cmake -E echo >> $${{env.ENV}}GITHUB_ENV ${{steps.fasmg-url.outputs.result}}
60+
- name: Download Fasmg
61+
id: fasmg
62+
uses: carlosperate/download-file-action@v1.0.3
63+
with:
64+
file-url: https://flatassembler.net/${{env.href}}
65+
- name: Extract Fasmg
66+
uses: DuckSoft/extract-7z-action@v1.0
67+
with:
68+
pathSource: ${{steps.fasmg.outputs.file-path}}
69+
pathTarget: fasmg
70+
- name: Setup Fasmg
71+
run: cmake -E copy fasmg${{env.FASMG_PATH}}/fasmg${{env.EXE}} CEdev/bin
72+
73+
- name: Make Binaries Executable
4674
if: runner.os != 'Windows'
47-
run: chmod +x CEdev/bin/ez80-clang${{env.EXE}}
48-
- name: Test ez80-clang
49-
run: ez80-clang --version
75+
run: chmod +x CEdev/bin/*
76+
- name: Test Build Dependencies
77+
run: |
78+
ez80-clang --version
79+
fasmg ${{env.NUL}} ${{env.NUL}}
5080
5181
- name: Checkout Toolchain
5282
uses: actions/checkout@v2.3.4
5383
with:
5484
path: toolchain
5585
submodules: recursive
56-
57-
- name: Setup Fasmg
58-
if: runner.os == 'Windows'
59-
run: cmake -E copy toolchain/tools/fasmg/windows/fasmg.exe CEdev/bin
60-
- name: Setup Fasmg
61-
if: runner.os == 'Linux'
62-
run: |
63-
cp toolchain/tools/fasmg/linux/fasmg CEdev/bin
64-
chmod +x CEdev/bin/fasmg
65-
- name: Setup Fasmg
66-
if: runner.os == 'macOS'
67-
run: |
68-
cp toolchain/tools/fasmg/macos/fasmg CEdev/bin
69-
chmod +x CEdev/bin/fasmg
70-
7186
- name: Build Toolchain
7287
run: make -j4 -C toolchain V=1
7388
- name: Install Toolchain

0 commit comments

Comments
 (0)