@@ -34,13 +34,16 @@ jobs:
3434 run : |
3535 flake8 . --count --ignore=E1,E2,E3,E501,W291,W293 --exit-zero --max-complexity=65 --max-line-length=127 --statistics
3636
37- binutils :
37+ binutils_linux :
3838 name : Build Binutils Linux
3939 needs : lint
4040 runs-on : ubuntu-latest
4141 if :
4242 github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
4343 github.repository
44+ env :
45+ bin_version : ' 2.40'
46+ bin_platform : ' x86_64-pc-linux-gnu'
4447
4548 strategy :
4649 fail-fast : false
@@ -52,29 +55,36 @@ jobs:
5255 version : latest
5356 platform : x64
5457
55- - name : Install Python dependencies
56- run : |
57- apt install -y texinfo flex bison libgmp-dev libmpfr-dev make wget
58+ - name : Install dependencies
59+ uses : awalsh128/cache-apt-pkgs-action@latest
5860 with :
59- version : ' 2.40 '
60- platform : ' x86_64-pc-linux-gnu '
61+ packages : texinfo flex bison libgmp-dev libmpfr-dev make wget
62+ version : 1.0
6163
6264 - name : Download binutils
6365 run : |
64- wget http://ftp.gnu.org/gnu/binutils/binutils-$version.tar.gz
65- tar xzf binutils-$version.tar.gz
66+ mkdir $GITHUB_WORKSPACE/build/
67+ cd $GITHUB_WORKSPACE/build/
68+ wget http://ftp.gnu.org/gnu/binutils/binutils-$bin_version.tar.gz
69+ tar xzf binutils-$bin_version.tar.gz
6670
6771 - name : Build binutils
6872 run : |
69- cd binutils-$version
70- CC=gcc ./configure --target=$platform --disable-nls
73+ cd $GITHUB_WORKSPACE/build/ binutils-$bin_version
74+ CC=gcc ./configure --target=$bin_platform --disable-nls
7175 make configure-host
7276 make LDFLAGS="-all-static"
73- ./binutils/objdump --version
77+ cp ./binutils/objdump ${{ github.workspace }}/objdump_linux
78+
79+ - uses : actions/upload-artifact@v2
80+ with :
81+ name : objdump_linux
82+ path : ${{ github.workspace }}/objdump_linux
83+ retention-days : 3
7484
7585 build :
7686 name : Build
77- needs : binutils
87+ needs : binutils_linux
7888 runs-on : ubuntu-latest
7989 if :
8090 github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
0 commit comments