Use su to install GAS in GitHub workflow #224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test, Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Get the latest version of binutils and install GAS | |
| run: | | |
| LATEST_RELEASE_URL=$(wget -q -O - ftp://ftp.gnu.org/gnu/binutils/ | grep -o "ftp[^\"]*.tar.gz" | sort -V | tail -n 1) | |
| wget -m ${LATEST_RELEASE_URL} -nd -O binutils-latest.tar.gz | |
| mkdir binutils | |
| tar xf binutils-latest.tar.gz -C binutils --strip-components 1 | |
| cd binutils | |
| ./configure | |
| su -c "make all-gas install-gas" | |
| as --version | |
| - name: Install and Build | |
| run: | | |
| npm install | |
| npm run build --prefix cli | |
| npm run build --prefix codemirror | |
| - name: Test | |
| run: | | |
| npm test | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Install and Build | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Deploy 🚀 | |
| uses: JamesIves/[email protected] | |
| with: | |
| branch: gh-pages | |
| folder: gh-pages |