Skip to content

Commit

Permalink
GitHub Actions: Use actions/cache@v4 and ubuntu-24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
minoki committed Sep 12, 2024
1 parent 140dd36 commit 8d4fccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- uses: actions/checkout@v4
- name: Cache smlfmt
id: cache-smlfmt
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local/bin
key: ${{ runner.os }}-smlfmt
Expand Down
24 changes: 2 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,13 @@ name: ci
jobs:
build-and-test:
name: build-and-test
runs-on: ubuntu-20.04 # 22.04 doesn't contain mlton
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install mlton luajit
# ubuntu-20.04 has Lua 5.3.3 as lua5.3, which is buggy.
- name: Cache Lua 5.3 binary
id: cache-lua53
uses: actions/cache@v3
env:
cache-name: cache-lua5.3.6
with:
path: ~/.local/bin
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}
- if: ${{ steps.cache-lua53.outputs.cache-hit != 'true' }}
name: Build Lua 5.3.6
run: |
curl -LO https://www.lua.org/ftp/lua-5.3.6.tar.gz
tar xf lua-5.3.6.tar.gz
cd lua-5.3.6
make -j linux
mkdir -p ~/.local/bin
cp src/lua ~/.local/bin/
cp src/luac ~/.local/bin/
sudo apt-get install mlton lua5.3 luajit
- name: Build
run: make
- name: Test (Lua)
Expand Down

0 comments on commit 8d4fccc

Please sign in to comment.