From e242a1676aacc36ae2531a59af564fa551e76dc9 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:18:52 +1300 Subject: [PATCH] ci: more context var use --- .github/workflows/test-linux.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 5893d683c65..c68310698f4 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -11,6 +11,9 @@ on: jobs: build-linux: runs-on: ${{ matrix.os.id }} + env: + CC: ${{ matrix.compiler }} + CXXSTD: ${{ matrix.cpp_std }} strategy: matrix: os: @@ -39,8 +42,6 @@ jobs: echo "CC=$CC" >> $GITHUB_ENV echo "CXX=$CXX" >> $GITHUB_ENV echo "CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS" >> $GITHUB_ENV - env: - CC: ${{ matrix.compiler }} - name: Setup Clang if: startsWith(matrix.compiler, 'clang') @@ -55,16 +56,11 @@ jobs: sudo apt-get install $CC $CXX echo "CC=$CC" >> $GITHUB_ENV echo "CXX=$CXX" >> $GITHUB_ENV - env: - CC: ${{ matrix.compiler }} - name: Runtime environment shell: bash - env: - WORKSPACE: ${{ github.workspace }} run: | - echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH echo "procs=$(nproc)" >> $GITHUB_ENV - name: Tool versions @@ -82,7 +78,7 @@ jobs: mkdir build cd build make -f ../Makefile config-${CC%%-*} - make -f ../Makefile -j${{ env.procs }} CXXSTD=${{ matrix.cpp_std }} CC=$CC CXX=$CC LD=$CC + make -f ../Makefile -j${{ env.procs }} CXXSTD=${{ env.CXXSTD }} CC=$CC CXX=$CC LD=$CC - name: Compress build shell: bash @@ -129,11 +125,8 @@ jobs: - name: Runtime environment shell: bash - env: - WORKSPACE: ${{ github.workspace }} run: | - echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV - echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/.local/bin" >> $GITHUB_PATH echo "procs=$(nproc)" >> $GITHUB_ENV - name: Checkout Yosys @@ -158,10 +151,10 @@ jobs: if: steps.cache-iverilog.outputs.cache-hit != 'true' shell: bash run: | - mkdir -p $GITHUB_WORKSPACE/.local/ + mkdir -p ${{ github.workspace }}/.local/ cd iverilog autoconf - CC=gcc CXX=g++ ./configure --prefix=$GITHUB_WORKSPACE/.local + CC=gcc CXX=g++ ./configure --prefix=${{ github.workspace }}/.local make -j${{ env.procs }} make install