Skip to content

Commit

Permalink
XXX remove
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Dec 12, 2024
1 parent e01f5a4 commit 53b87e2
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 119 deletions.
53 changes: 2 additions & 51 deletions .github/workflows/selftest.macos-13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: 0 0 1 * *
push:
branches:
- selftest
- update
jobs:
build:
name: ${{ matrix.os }} / GHC ${{ matrix.ghc }}
Expand All @@ -21,58 +21,9 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- macos-13
ghc:
- 7.10.3
- 8.0.2
- 8.2.2
- 8.4.1
- 8.4.2
- 8.4.3
- 8.4.4
- 8.6.1
- 8.6.2
- 8.6.3
- 8.6.4
- 8.6.5
- 8.8.1
- 8.8.2
- 8.8.3
- 8.8.4
- 8.10.1
- 8.10.2
- 8.10.3
- 8.10.4
- 8.10.5
- 8.10.6
- 8.10.7
- 9.0.1
- 9.0.2
- 9.2.1
- 9.2.2
- 9.2.3
- 9.2.4
- 9.2.5
- 9.2.6
- 9.2.7
- 9.2.8
- 9.4.1
- 9.4.2
- 9.4.3
- 9.4.4
- 9.4.5
- 9.4.6
- 9.4.7
- 9.4.8
- 9.6.1
- 9.6.2
- 9.6.3
- 9.6.4
- 9.6.5
- 9.6.6
- 9.8.1
- 9.8.2
- 9.8.4
- 9.10.1
1 change: 1 addition & 0 deletions .github/workflows/selftest.macos-14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- macos-14
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.macos-15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- macos-15
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.ubuntu-20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.ubuntu-22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.ubuntu-24.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.windows-2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- windows-2019
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selftest.windows-2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- run: cabal install alex
- run: alex --version
strategy:
fail-fast: false
matrix:
os:
- windows-2022
Expand Down
100 changes: 50 additions & 50 deletions README.md

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generate/selftest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function versionMap() {
'ubuntu-20.04': new Set([...ppa.ubuntu20, ...ghcup]),
'ubuntu-22.04': new Set([...ghcup].filter(v => !not_working_on_ubuntu_22_04.has(v))),
'ubuntu-24.04': ghcup,
'macos-13': ghcup,
'macos-13': new Set(['9.8.2']),
'macos-14': ghcup,
'macos-15': ghcup,
'windows-2019': ghcup,
Expand Down
1 change: 0 additions & 1 deletion src/ghcup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export async function install(version: string) {
}
await core.group('ghcup install', async () => {
await exec(`ghcup install ghc ${version} --set`);
core.addPath('$HOME/.ghcup/bin');
});
}

Expand Down
23 changes: 15 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@ import * as fs from 'fs';
import * as core from '@actions/core';
import { exec } from '@actions/exec';

import { which } from '@actions/io';

import * as apt from './apt';
import * as ghcup from './ghcup';
import { installed, resolve, ResolvedVersion } from './resolve';

async function main() {
try {
if (!await which('ghcup')) {
await exec('brew install ghcup');
const home = process.env['HOME'];
if (home) {
core.addPath(home + '/.ghcup/bin/');
}
}

if (!await which('cabal')) {
await exec('ghcup install cabal latest --set');
}

await exec('ghcup install ghc latest --set');
await workaroundRunnerImageIssue7061();
await addCabalBinToPath();
const requested = core.getInput('ghc-version');
const version = await ensure(requested);
core.setOutput('ghc-version', version);
Expand All @@ -32,13 +46,6 @@ async function workaroundRunnerImageIssue7061() {
});
}

async function addCabalBinToPath() {
const home = process.env['HOME'];
if (home) {
core.addPath(home + '/.cabal/bin/');
}
}

async function ensure(requested: string): Promise<string> {
const resolved = await resolve(requested);
await install(resolved);
Expand Down

0 comments on commit 53b87e2

Please sign in to comment.