Skip to content

Commit

Permalink
Merge pull request #109 from DDP-Projekt/actions-fix
Browse files Browse the repository at this point in the history
Github-Actions fix
  • Loading branch information
bafto authored Dec 20, 2024
2 parents 3a48299 + 9b9b85d commit 4621608
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ jobs:
with:
go-version-file: go.mod
cache-key-suffix: kompilierer

- name: Setup LLVM
if: runner.os == 'Linux'
run: sudo apt install llvm-12

- name: Cache LLVM
if: runner.os == 'Windows'
id: cache-llvm
uses: actions/cache@v4
with:
Expand All @@ -44,10 +39,10 @@ jobs:
restore-keys: |
${{ runner.os }}-llvm-build-
- name: Download Prebuilt LLVM
if: runner.os == 'Windows' && steps.cache-llvm.outputs.cache-hit != 'true'
- name: Setup LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
curl -L -o ./llvm_build.tar.gz https://github.com/DDP-Projekt/Kompilierer/releases/download/llvm-binaries/llvm_build-mingw-12.2.0-x86_64-ucrt-posix-seh.tar.gz
curl -L -o ./llvm_build.tar.gz https://github.com/DDP-Projekt/Kompilierer/releases/download/llvm-binaries/llvm_build-${{ runner.os == 'Windows' && 'mingw-12.2.0-x86_64-ucrt-posix-seh' || 'linux-11.4.0-x86_64' }}.tar.gz
mkdir -p ./llvm_build/
tar -xzf ./llvm_build.tar.gz -C ./ --force-local
rm ./llvm_build.tar.gz
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,24 @@ jobs:
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/llvm_build/
key: ${{ runner.os }}-llvm-build-${{ hashFiles('**/Makefile', '**/cmd/Makefile') }}
restore-keys: |
${{ runner.os }}-llvm-build-
- name: Setup LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
curl -L -o ./llvm_build.tar.gz https://github.com/DDP-Projekt/Kompilierer/releases/download/llvm-binaries/llvm_build-${{ runner.os == 'Windows' && 'mingw-12.2.0-x86_64-ucrt-posix-seh' || 'linux-11.4.0-x86_64' }}.tar.gz
mkdir -p ./llvm_build/
tar -xzf ./llvm_build.tar.gz -C ./ --force-local
rm ./llvm_build.tar.gz
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
Expand All @@ -94,7 +112,6 @@ jobs:
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
sudo apt install llvm-12
sudo locale-gen de_DE.UTF-8
make -j$(nproc)
Expand Down

0 comments on commit 4621608

Please sign in to comment.